Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyEmailRecipient(recipient email.Recipient) error
- func ApplyEmailSender(sender email.Sender) error
- func ApplySlackChannel(channel slack.CosChannel) error
- func ApplyTitlePrefix(titlePrefix string) error
- func ApplyTrigger(trigger triggers.CosSchema) error
- func ApplyTuning(isolatedDir string) error
- func ApplyTunings(tunings []tunings.Tuning) error
- func CheckServiceHealth(service services.Service) error
- func ConvertToBlockDevice(rawBlockDev nodes.RawBlockDevice) nodes.BlockDevice
- func CountEvents(stmt string) (int64, error)
- func CreateSupportCommentFile(file support.File) (string, error)
- func CreateSupportFile(file support.File) error
- func CreateToken(user *auths.User) (*gocloak.JWT, error)
- func DeleteAndCreateEmailRecipient(setting settings.Setting) error
- func DeleteAndCreateSlackChannel(setting settings.Setting) error
- func DeleteEmailRecipient(address string) error
- func DeleteEmailSender() error
- func DeleteSlackChannel(url string) error
- func GeHostsDiskLatencyHistory(readStmt, writeStmt string) (*metric.StorageTimeSeries, error)
- func GenModuleHealthHistoryQuery(moduleName, past, order string, onlyLast bool) string
- func GetAlertSetting() (*settings.Cos, error)
- func GetClusterVirtualIp() (string, error)
- func GetControllerVirtualIp(mgmtNet string) (string, error)
- func GetDataCenterName() (string, error)
- func GetDataCenterNumericVersion() (string, error)
- func GetDataCenterVersion() (string, error)
- func GetDiskWriteIopsHistoryOfVm(entityId, device string) ([]metric.TimeValue, error)
- func GetEmailRecipients() ([]email.Recipient, error)
- func GetEmailSenders() ([]email.Sender, error)
- func GetEventFilterConditions(stmt string) ([]string, error)
- func GetEventRank(stmt string) ([]event.Stat, error)
- func GetHostCpuHistory(stmt string) (*metric.History, error)
- func GetHostCpuSummary(hostname string) (*metric.Compute, error)
- func GetHostDiskStorageSummary() (*metric.Space, error)
- func GetHostDiskUsageHistory(entityId string, period time.Period) ([]metric.TimeValue, error)
- func GetHostMemoryHistory(stmt string) ([]metric.TimeValue, error)
- func GetHostMemorySizeHistory(stmt string) (*metric.History, error)
- func GetHostMemoryUsageSummary(hostname string) (*metric.Space, error)
- func GetHostNetworkEgressHistory(entityId string, period time.Period) ([]metric.TimeValue, error)
- func GetHostNetworkIngressHistory(entityId string, period time.Period) ([]metric.TimeValue, error)
- func GetHostUsage(node nodes.Node) (*metric.HostUsage, error)
- func GetHostsCpuAverage(cpuStats []metric.Compute) metric.Compute
- func GetHostsCpuSummary(stmt string) (*metric.Compute, error)
- func GetHostsCpuUsageRank(stmt string) (*metric.Rank, error)
- func GetHostsDiskBandwidthHistory(readStmt, writeStmt string) (*metric.StorageTimeSeries, error)
- func GetHostsDiskIopsHistory(readStmt, writeStmt string) (*metric.StorageTimeSeries, error)
- func GetHostsDiskUsageRank(stmt string) (*metric.Rank, error)
- func GetHostsMemoryAverage(spaceStats []metric.Space) metric.Space
- func GetHostsMemoryUsageRank(stmt string) (*metric.Rank, error)
- func GetHostsMemoryUsageSummary() (*metric.Space, error)
- func GetHostsNetworkEgressRank() (*metric.Rank, error)
- func GetHostsNetworkIngressRank() (*metric.Rank, error)
- func GetManagementIp(mgmtNet string) (string, error)
- func GetManagementNet() (string, error)
- func GetMemoryHistoryOfVm(entityId string, period time.Period) ([]metric.TimeValue, error)
- func GetModuleHealthHistory(moduleName, duration, order string, onlyLast bool) ([]health.Check, error)
- func GetNodeRole() (string, error)
- func GetOpenSearchRequestLink(requestId string) (string, error)
- func GetRawBlockDevices() ([]nodes.RawBlockDevice, error)
- func GetRepairingInfo() (*services.ReairingInfo, error)
- func GetServicesToCheckHealth() []services.Service
- func GetSlackChannel(channel string) (slack.CosChannel, error)
- func GetSlackChannels() ([]slack.CosChannel, error)
- func GetSourceAlertSetting() (*settings.Cos, error)
- func GetSourceNodeMap() (map[string]nodes.Node, error)
- func GetSourceTuning(name string) (*tunings.Tuning, error)
- func GetStandaloneVirtualIp(mgmtNet string) (string, error)
- func GetStorageIp(storageNet string) (string, error)
- func GetStorageNet() (string, error)
- func GetSupportFile(file support.File) (string, error)
- func GetSupportFileComment(file string) (*support.File, error)
- func GetSupportFileUrl(file support.File) string
- func GetTriggers() ([]triggers.CosSchema, error)
- func GetTuningPolicy(filePath string) (*tunings.Policy, error)
- func GetTuningValue(name string) (string, error)
- func GetUnhealthyServices() ([]services.Service, error)
- func GetVmCpuHistory(entityId string, period time.Period) ([]metric.TimeValue, error)
- func GetVmDiskReadIopsHistory(entityId, device string) ([]metric.TimeValue, error)
- func GetVmNetworkTrafficInHistory(entityId, device string) ([]metric.TimeValue, error)
- func GetVmNetworkTrafficOutHistory(entityId, device string) ([]metric.TimeValue, error)
- func GetVmUsage() (*metric.VmUsage, error)
- func GetVmsCpuUsageRank(stmt string) (*metric.Rank, error)
- func GetVmsDiskReadIopsRank(stmt string) (*metric.Rank, error)
- func GetVmsDiskWriteIopsRank(stmt string) (*metric.Rank, error)
- func GetVmsMemoryUsageRank(stmt string) (*metric.Rank, error)
- func GetVmsNetworkEgressRank(stmt string) (*metric.Rank, error)
- func GetVmsNetworkIngressRank(stmt string) (*metric.Rank, error)
- func ImportClusterLicense(licensePath string) error
- func ImportNodeLicense(licensePath string) error
- func IsAlertSetting(file string) bool
- func IsClusterSetReady() bool
- func IsEntityTypeValid(t string) bool
- func IsExpectedEmptyStdOut(err error) bool
- func IsGpuEnabled() (bool, error)
- func IsHaEnabled() (bool, error)
- func IsHexSdkSuccess(err error) bool
- func IsLicenseFile(file string) bool
- func IsLocalDataCenter(dataCenter string) bool
- func IsMetricReportTypeValid(t string) bool
- func IsModuleHealthy(moduleName string) bool
- func IsOvnSFlowEnabled() bool
- func IsRepairable() bool
- func IsRepairableModule(module string) bool
- func IsRepairing() bool
- func IsSettingDeleted(setting settings.Setting) bool
- func IsSupportFile(file string) bool
- func IsTriggerExist(name string) bool
- func IsTuningApplied(tuning tunings.Tuning) error
- func IsTuningDeleted(tuning tunings.Tuning) bool
- func IsValidMetricType(t string) bool
- func IsValidService(service string) bool
- func IsValidServiceAndModule(service, module string) bool
- func ListBuiltInIntegrations() []integration.Service
- func ListEvents(stmt string) ([]event.Options, error)
- func ListHostSupportFiles(opts support.ListFileOptions) ([]support.File, error)
- func ListLicenses() ([]licenses.License, error)
- func ListSupportFiles(opts support.ListFileOptions) ([]support.File, error)
- func ListSupportFilesFromOtherNodes() ([]support.File, error)
- func ListTunings(opts tunings.ListOptions) ([]tunings.Tuning, error)
- func ListTuningsFromOtherNodes() (map[string][]tunings.Tuning, error)
- func ParseLicenseExpiryAndStatus(value string) (licenses.Expiry, status.License)
- func PutSupportFileToBucket(key string, file io.Reader) error
- func ReadSettingSys(settingName string) (string, error)
- func RemovePendingReq(db, collection string)
- func RepairModule(moduleName string) error
- func RepairServiceHealth(service services.Service) error
- func SetSupportFileComment(file support.File) error
- func SetUnhealthLogUrl(history *[]health.Check)
- func SyncAlertSettings()
- func SyncBucketStore() error
- func SyncHealthHistory()
- func SyncMetricsSummary()
- func SyncSourceLicense()
- func SyncSupportFiles()
- func SyncTunings()
- func UploadSupportFileToObjectStore(supportFile support.File) error
- func VerifyLicense(file string) (*licenses.Verification, error)
- func WriteFakePolicyFile(policy *settings.Cos)
- type DataCenterSummary
- type Health
- type HostSummary
- type HostUsage
- type Ip
- type ModuleHealth
- type NetworkInterface
- type Node
- type Overall
- type Role
- type RoleUsage
- type Summary
- type VmStatus
- type VmSummary
Constants ¶
View Source
const ( LicenseValid = 1 LicenseExpired = 251 LicenseNotInstalled = 252 LicenseInvalidHardware = 253 LicenseInvalidSignature = 254 LicenseSysytemCompromised = 255 )
View Source
const ( TuningPolicyFile = "/etc/policies/tuning/tuning1_0.yml" // private tunings CubeSysHa = "cubesys.ha" CubeSysController = "cubesys.controller" CubeSysControllerVip = "cubesys.control.vip" CubeSysControllerIp = "cubesys.controller.ip" CubeSysManagementNetwork = "cubesys.management" CubeSysStorageNetwork = "cubesys.storage" CubeNetIfAddrPrefix = "net.if.addr." NetIfAddrEth0 = "net.if.addr.eth0" // public tunings BarbicanDebugEnabled = "barbican.debug.enabled" CephDebugEnabled = "ceph.debug.enabled" CephMirrorMetaSync = "ceph.mirror.meta.sync" CinderBackupAccount = "cinder.backup.account" CinderBackupEndpoint = "cinder.backup.endpoint" CinderBackupOverride = "cinder.backup.override" CinderBackupPool = "cinder.backup.pool" CinderBackupSecret = "cinder.backup.secret" CinderBackupType = "cinder.backup.type" CinderDebugEnabled = "cinder.debug.enabled" CinderExternalAccount = "cinder.external.%d.account" CinderExternalDriver = "cinder.external.%d.driver" CinderExternalEndpoint = "cinder.external.%d.endpoint" CinderExternalName = "cinder.external.%d.name" CinderExternalPool = "cinder.external.%d.pool" CinderExternalSecret = "cinder.external.%d.secret" CubesysAlertLevel = "cubesys.alert.level" CubesysAlertLevelS = "cubesys.alert.level.%s" CubesysConntableMax = "cubesys.conntable.max" CubesysLogDefaultRetention = "cubesys.log.default.retention" CubesysProviderExtra = "cubesys.provider.extra" CyborgDebugEnabled = "cyborg.debug.enabled" DebugEnableCoreDumpS = "debug.enable_core_dump.%s" DebugEnableKdump = "debug.enable_kdump" DebugLevelS = "debug.level.%s" DebugMaxCoreDump = "debug.max_core_dump" DesignateDebugEnabled = "designate.debug.enabled" GlanceDebugEnabled = "glance.debug.enabled" GlanceExportRp = "glance.export.rp" HeatDebugEnabled = "heat.debug.enabled" InfluxdbCuratorRp = "influxdb.curator.rp" IronicDebugEnabled = "ironic.debug.enabled" IronicDeployServer = "ironic.deploy.server" KapacitorAlertCheckEnabled = "kapacitor.alert.check.enabled" KapacitorAlertCheckEventId = "kapacitor.alert.check.eventid" KapacitorAlertCheckInterval = "kapacitor.alert.check.interval" KapacitorAlertExtraPrefix = "kapacitor.alert.extra.prefix" KapacitorAlertFlowBase = "kapacitor.alert.flow.base" KapacitorAlertFlowThreshold = "kapacitor.alert.flow.threshold" KapacitorAlertFlowUnit = "kapacitor.alert.flow.unit" KeystoneDebugEnabled = "keystone.debug.enabled" ManilaDebugEnabled = "manila.debug.enabled" ManilaVolumeType = "manila.volume.type" MasakariHostEvacuateAll = "masakari.host.evacuate_all" MasakariWaitPeriod = "masakari.wait.period" MonascaDebugEnabled = "monasca.debug.enabled" MysqlBackupCuratorRp = "mysql.backup.curator.rp" NetIfMtuName = "net.if.mtu.<name>" NetLacpDefaultRate = "net.lacp.default.rate" NetLacpDefaultXmit = "net.lacp.default.xmit" NeutronDebugEnabled = "neutron.debug.enabled" NovaControlHostMemory = "nova.control.host.memory" NovaControlHostVcpu = "nova.control.host.vcpu" NovaDebugEnabled = "nova.debug.enabled" NovaGpuType = "nova.gpu.type" NovaOvercommitCpuRatio = "nova.overcommit.cpu.ratio" NovaOvercommitDiskRatio = "nova.overcommit.disk.ratio" NovaOvercommitRamRatio = "nova.overcommit.ram.ratio" NtpDebugEnabled = "ntp.debug.enabled" OctaviaDebugEnabled = "octavia.debug.enabled" OctaviaHa = "octavia.ha" OpensearchCuratorRp = "opensearch.curator.rp" OpensearchHeapSize = "opensearch.heap.size" SenlinDebugEnabled = "senlin.debug.enabled" SkylineDebugEnabled = "skyline.debug.enabled" SnapshotApplyAction = "snapshot.apply.action" SnapshotApplyPolicyIgnore = "snapshot.apply.policy.ignore" SshdBindToAllInterfaces = "sshd.bind_to_all_interfaces" SshdSessionInactivity = "sshd.session.inactivity" TimeTimezone = "time.timezone" UpdateSecurityAutoUpdate = "update.security.autoupdate" WatcherDebugEnabled = "watcher.debug.enabled" // setting sys SysProductDescription = "sys.product.description" SysProductVersion = "sys.product.version" )
View Source
const (
EtcNodeInventory = "/etc/settings.cluster.json"
)
Variables ¶
View Source
var ( // note: // the orderSensitiveServices is a list of services that are ordered by their dependencies. // please do not change the order of the services in this list unless you know what you are doing. OrderSensitiveServices = []services.Service{ { Name: "clusterLink", Category: "core", Modules: []services.Module{ {Name: "link", IsRepairable: false}, {Name: "clock", IsRepairable: true}, {Name: "dns", IsRepairable: false}, }, }, { Name: "clusterSys", Category: "core", Modules: []services.Module{ {Name: "bootstrap", IsRepairable: false}, {Name: "license", IsRepairable: false}, }, }, { Name: "clusterSettings", Category: "core", Modules: []services.Module{ {Name: "etcd", IsRepairable: true}, {Name: "nodelist", IsRepairable: false}, {Name: "mongodb", IsRepairable: true}, }, }, { Name: "haCluster", Category: "core", Modules: []services.Module{ {Name: "hacluster", IsRepairable: true}, }, }, { Name: "msgQueue", Category: "core", Modules: []services.Module{ {Name: "rabbitmq", IsRepairable: true}, }, }, { Name: "iaasDb", Category: "core", Modules: []services.Module{ {Name: "mysql", IsRepairable: true}, }, }, { Name: "virtualIp", Category: "core", Modules: []services.Module{ {Name: "vip", IsRepairable: true}, {Name: "haproxy_ha", IsRepairable: true}, }, }, { Name: "storage", Category: "storage", Modules: []services.Module{ {Name: "ceph", IsRepairable: false}, {Name: "ceph_mon", IsRepairable: true}, {Name: "ceph_mgr", IsRepairable: true}, {Name: "ceph_mds", IsRepairable: true}, {Name: "ceph_osd", IsRepairable: true}, {Name: "ceph_rgw", IsRepairable: true}, {Name: "rbd_target", IsRepairable: false}, }, }, { Name: "apiService", Category: "core", Modules: []services.Module{ {Name: "haproxy", IsRepairable: true}, {Name: "httpd", IsRepairable: true}, {Name: "skyline", IsRepairable: true}, {Name: "lmi", IsRepairable: true}, {Name: "memcache", IsRepairable: true}, {Name: "api", IsRepairable: true}, }, }, { Name: "singleSignOn", Category: "core", Modules: []services.Module{ {Name: "k3s", IsRepairable: true}, {Name: "keycloak", IsRepairable: true}, }, }, { Name: "network", Category: "cloud computing", Modules: []services.Module{ {Name: "neutron", IsRepairable: true}, }, }, { Name: "compute", Category: "cloud computing", Modules: []services.Module{ {Name: "nova", IsRepairable: true}, {Name: "cyborg", IsRepairable: true}, }, }, { Name: "bareMetal", Category: "cloud computing", Modules: []services.Module{ {Name: "ironic", IsRepairable: true}, }, }, { Name: "image", Category: "cloud computing", Modules: []services.Module{ {Name: "glance", IsRepairable: true}, }, }, { Name: "blockStor", Category: "cloud computing", Modules: []services.Module{ {Name: "cinder", IsRepairable: true}, }, }, { Name: "fileStor", Category: "cloud computing", Modules: []services.Module{ {Name: "manila", IsRepairable: true}, }, }, { Name: "objectStor", Category: "cloud computing", Modules: []services.Module{ {Name: "swift", IsRepairable: false}, }, }, { Name: "orchestration", Category: "cloud computing", Modules: []services.Module{ {Name: "heat", IsRepairable: true}, }, }, { Name: "lbaas", Category: "cloud computing", Modules: []services.Module{ {Name: "octavia", IsRepairable: true}, }, }, { Name: "dnsaas", Category: "cloud computing", Modules: []services.Module{ {Name: "designate", IsRepairable: true}, }, }, { Name: "k8saas", Category: "cloud computing", Modules: []services.Module{ {Name: "rancher", IsRepairable: false}, }, }, { Name: "instanceHa", Category: "cloud computing", Modules: []services.Module{ {Name: "masakari", IsRepairable: true}, }, }, { Name: "businessLogic", Category: "cloud computing", Modules: []services.Module{ {Name: "senlin", IsRepairable: true}, {Name: "watcher", IsRepairable: true}, }, }, { Name: "dataPipe", Category: "infrascope", Modules: []services.Module{ {Name: "zookeeper", IsRepairable: true}, {Name: "kafka", IsRepairable: true}, }, }, { Name: "metrics", Category: "infrascope", Modules: []services.Module{ {Name: "monasca", IsRepairable: true}, {Name: "telegraf", IsRepairable: true}, {Name: "grafana", IsRepairable: true}, }, }, { Name: "logAnalytics", Category: "infrascope", Modules: []services.Module{ {Name: "filebeat", IsRepairable: true}, {Name: "auditbeat", IsRepairable: true}, {Name: "logstash", IsRepairable: true}, {Name: "opensearch", IsRepairable: true}, {Name: "opensearch-dashboards", IsRepairable: true}, }, }, { Name: "notifications", Category: "infrascope", Modules: []services.Module{ {Name: "influxdb", IsRepairable: true}, {Name: "kapacitor", IsRepairable: true}, }, }, { Name: "node", IsInternalViewOnly: true, Modules: []services.Module{ {Name: "node", IsRepairable: false}, }, }, } Modules = map[string]services.Module{} ModuleToService = map[string]string{} ServiceToCategory = map[string]string{} ServiceToModules = map[string][]services.Module{} )
Functions ¶
func ApplyEmailRecipient ¶
func ApplyEmailSender ¶
func ApplySlackChannel ¶
func ApplySlackChannel(channel slack.CosChannel) error
func ApplyTitlePrefix ¶
func ApplyTrigger ¶
func ApplyTuning ¶
func ApplyTunings ¶
func CheckServiceHealth ¶
func ConvertToBlockDevice ¶
func ConvertToBlockDevice(rawBlockDev nodes.RawBlockDevice) nodes.BlockDevice
func CountEvents ¶
func CreateSupportFile ¶
func CreateToken ¶
func DeleteEmailRecipient ¶
func DeleteEmailSender ¶
func DeleteEmailSender() error
func DeleteSlackChannel ¶
func GeHostsDiskLatencyHistory ¶
func GeHostsDiskLatencyHistory(readStmt, writeStmt string) (*metric.StorageTimeSeries, error)
func GetAlertSetting ¶
func GetClusterVirtualIp ¶
func GetControllerVirtualIp ¶
func GetDataCenterName ¶
func GetDataCenterVersion ¶
func GetEmailRecipients ¶
func GetEmailSenders ¶
func GetHostDiskUsageHistory ¶
func GetHostsDiskBandwidthHistory ¶
func GetHostsDiskBandwidthHistory(readStmt, writeStmt string) (*metric.StorageTimeSeries, error)
func GetHostsDiskIopsHistory ¶
func GetHostsDiskIopsHistory(readStmt, writeStmt string) (*metric.StorageTimeSeries, error)
func GetManagementIp ¶
func GetManagementNet ¶
func GetMemoryHistoryOfVm ¶
func GetModuleHealthHistory ¶
func GetNodeRole ¶
func GetRawBlockDevices ¶
func GetRawBlockDevices() ([]nodes.RawBlockDevice, error)
func GetRepairingInfo ¶
func GetRepairingInfo() (*services.ReairingInfo, error)
func GetSlackChannel ¶
func GetSlackChannel(channel string) (slack.CosChannel, error)
func GetSlackChannels ¶
func GetSlackChannels() ([]slack.CosChannel, error)
func GetSourceAlertSetting ¶
func GetStandaloneVirtualIp ¶
func GetStorageIp ¶
func GetStorageNet ¶
func GetSupportFileUrl ¶
func GetTriggers ¶
func GetTuningValue ¶
func GetUnhealthyServices ¶
func GetVmCpuHistory ¶
func GetVmUsage ¶
func ImportClusterLicense ¶
note: currently, the COS license import result is not clear by identifying the return code because it will still return 0 even the result is not ok. see ticket to know more https://github.com/bigstack-oss/cubecos/issues/29
func ImportNodeLicense ¶
func IsAlertSetting ¶
func IsClusterSetReady ¶
func IsClusterSetReady() bool
func IsEntityTypeValid ¶
func IsExpectedEmptyStdOut ¶
func IsGpuEnabled ¶
func IsHaEnabled ¶
func IsHexSdkSuccess ¶
func IsLicenseFile ¶
func IsLocalDataCenter ¶
M2 TODO: Check if the data center is local
func IsMetricReportTypeValid ¶
func IsModuleHealthy ¶
func IsOvnSFlowEnabled ¶
func IsOvnSFlowEnabled() bool
func IsRepairable ¶
func IsRepairable() bool
func IsRepairableModule ¶
func IsRepairing ¶
func IsRepairing() bool
func IsSettingDeleted ¶
func IsSupportFile ¶
func IsTriggerExist ¶
func IsTuningApplied ¶
func IsTuningDeleted ¶
func IsValidMetricType ¶
func IsValidService ¶
func IsValidServiceAndModule ¶
func ListBuiltInIntegrations ¶
func ListBuiltInIntegrations() []integration.Service
note: the description of each integration is from https://www.bigstack.co/products/cubecos/feature currently, cos has no the source text for it, but UI needs it, so we can only place it below for the time being.
also, cos is a bit hard to have a solid convention to fetch the port or path for the services, so we just hardcode the info here, but in the M2, can consider to discuss with team to support such features from cos.
func ListHostSupportFiles ¶
func ListHostSupportFiles(opts support.ListFileOptions) ([]support.File, error)
func ListLicenses ¶
func ListSupportFiles ¶
func ListSupportFiles(opts support.ListFileOptions) ([]support.File, error)
func ListTunings ¶
func ListTunings(opts tunings.ListOptions) ([]tunings.Tuning, error)
func ReadSettingSys ¶
func RemovePendingReq ¶
func RemovePendingReq(db, collection string)
func RepairModule ¶
func RepairServiceHealth ¶
func SetSupportFileComment ¶
func SetUnhealthLogUrl ¶
func SyncAlertSettings ¶
func SyncAlertSettings()
func SyncBucketStore ¶
func SyncBucketStore() error
func SyncHealthHistory ¶
func SyncHealthHistory()
func SyncMetricsSummary ¶
func SyncMetricsSummary()
func SyncSourceLicense ¶
func SyncSourceLicense()
func SyncSupportFiles ¶
func SyncSupportFiles()
func SyncTunings ¶
func SyncTunings()
func VerifyLicense ¶
func VerifyLicense(file string) (*licenses.Verification, error)
func WriteFakePolicyFile ¶
Types ¶
type DataCenterSummary ¶
type DataCenterSummary struct {
Usage metric.DataCenterUsage `json:"usage"`
}
func GetDataCenterUsage ¶
func GetDataCenterUsage(hostSummary *HostSummary) (*DataCenterSummary, error)
type Health ¶
type Health struct { *base.DataCenter `json:"dataCenter,omitempty" bson:"dataCenter,omitempty"` *Overall `json:"overall,omitempty" bson:"overall"` Services []services.Service `json:"services" bson:"services"` }
func GetHealthSummary ¶
func GetHealthSummary() Health
func (*Health) CopyEmptyServiceStruct ¶
func (*Health) HasUnhealthyService ¶
func (*Health) SetRepairingStatus ¶
type HostSummary ¶
func GetHostSummary ¶
func GetHostSummary() (*HostSummary, error)
func (*HostSummary) ListCpuUsages ¶
func (h *HostSummary) ListCpuUsages() []metric.Compute
func (*HostSummary) ListMemoryUsages ¶
func (h *HostSummary) ListMemoryUsages() []metric.Space
func (*HostSummary) SetHostUsages ¶
func (h *HostSummary) SetHostUsages(nodes []nodes.Node)
func (*HostSummary) SetRoleUsages ¶
func (h *HostSummary) SetRoleUsages()
type ModuleHealth ¶
type ModuleHealth struct { Category string `json:"category"` Name string `json:"name"` Module string `json:"module"` IsRepairable bool `json:"isRepairable"` History []health.Check `json:"history"` Status status.Health `json:"status"` }
func GetServiceHealthHistory ¶
func GetServiceHealthHistory(serviceName, duration string) []ModuleHealth
type NetworkInterface ¶
type NetworkInterface struct { Label string `json:"label" yaml:"label" bson:"label"` BusIdSlaves string `json:"busid" yaml:"busid" bson:"busid"` Driver string `json:"driver" yaml:"driver" bson:"driver"` State string `json:"state" yaml:"state" bson:"state"` Speed string `json:"speed" yaml:"speed" bson:"speed"` }
func DumpInterfaces ¶
func DumpInterfaces() ([]NetworkInterface, error)
type Summary ¶
type Summary struct { DataCenter DataCenterSummary `json:"dataCenter"` Host HostSummary `json:"host"` Vm VmSummary `json:"vm"` }
func GetMetricsSummary ¶
func GetMetricsSummary() *Summary
Click to show internal directories.
Click to hide internal directories.