Documentation
¶
Index ¶
- Constants
- Variables
- func AcquireTuningLock() error
- func ApplyTrigger(isolatedDir string) error
- func ApplyTriggers(triggers []trigger.Options) error
- func ApplyTuning(isolatedDir string) error
- func ApplyTunings(tunings []definition.Tuning) error
- func CheckServiceHealth(service v1.Service) error
- func CountEvents(stmt string) (int64, error)
- func CreateSupportCommentFile(file support.File) (string, error)
- func CreateSupportFile(file support.File) error
- func CreateToken(user *definition.User) (*gocloak.JWT, error)
- func GeDiskLatencyHistoryOfHosts(readStmt, writeStmt string) (*definition.StorageTimeSeries, error)
- func GenModuleHealthHistoryQuery(moduleName, past, order string, onlyLast bool) string
- func GetControllerVirtualIp(mgmtNet string) (string, error)
- func GetCpuAverageOfHosts(cpuStats []definition.ComputeStatistic) definition.ComputeStatistic
- func GetCpuHistoryOfHost(stmt string) ([]definition.TimeValue, error)
- func GetCpuHistoryOfVm(entityId string, period definition.Period) ([]definition.TimeValue, error)
- func GetCpuSummaryOfHost(hostname string) (*definition.ComputeStatistic, error)
- func GetCpuSummaryOfHosts(stmt string) (*definition.ComputeStatistic, error)
- func GetCpuUsageRankOfHosts(stmt string) (*definition.MetricRank, error)
- func GetCpuUsageRankOfVms(stmt string) (*definition.MetricRank, error)
- func GetDataCenterName() (string, error)
- func GetDataCenterNumericVersion() (string, error)
- func GetDataCenterVersion() (string, error)
- func GetDiskIopsHistoryOfHosts(readStmt, writeStmt string) (*definition.StorageTimeSeries, error)
- func GetDiskReadIopsHistoryOfVm(entityId, device string) ([]definition.TimeValue, error)
- func GetDiskReadIopsRankOfVms(stmt string) (*definition.MetricRank, error)
- func GetDiskStorageBandwidthHistory(readStmt, writeStmt string) (*definition.StorageTimeSeries, error)
- func GetDiskStorageSummaryOfHost() (*definition.SpaceStatistic, error)
- func GetDiskUsageHistoryOfHost(entityId string, period definition.Period) ([]definition.TimeValue, error)
- func GetDiskUsageRankOfHosts(stmt string) (*definition.MetricRank, error)
- func GetDiskWriteIopsHistoryOfVm(entityId, device string) ([]definition.TimeValue, error)
- func GetDiskWriteIopsRankOfVms(stmt string) (*definition.MetricRank, error)
- func GetEventFilterConditions(stmt string) ([]string, error)
- func GetEventRank(stmt string) ([]definition.EventStat, error)
- func GetEvents(stmt string) ([]definition.Event, error)
- func GetHostUsage(node definition.Node) (*definition.HostUsage, error)
- func GetManagementIp(mgmtNet string) (string, error)
- func GetMemoryAverageOfHosts(spaceStats []definition.SpaceStatistic) definition.SpaceStatistic
- func GetMemoryHistoryOfHost(stmt string) ([]definition.TimeValue, error)
- func GetMemoryHistoryOfVm(entityId string, period definition.Period) ([]definition.TimeValue, error)
- func GetMemoryUsageRankOfHosts(stmt string) (*definition.MetricRank, error)
- func GetMemoryUsageRankOfVms(stmt string) (*definition.MetricRank, error)
- func GetMemoryUsageSummaryOfHost(hostname string) (*definition.SpaceStatistic, error)
- func GetMemoryUsageSummaryOfHosts() (*definition.SpaceStatistic, error)
- func GetMgmtNet() (string, error)
- func GetModuleHealthHistory(moduleName, duration, order string, onlyLast bool) ([]v1.HealthCheck, error)
- func GetNetworkTrafficInHistoryOfHost(entityId string, period definition.Period) ([]definition.TimeValue, error)
- func GetNetworkTrafficInHistoryOfVm(entityId, device string) ([]definition.TimeValue, error)
- func GetNetworkTrafficInRankOfHosts() (*definition.MetricRank, error)
- func GetNetworkTrafficInRankOfVms(stmt string) (*definition.MetricRank, error)
- func GetNetworkTrafficOutHistoryOfHost(entityId string, period definition.Period) ([]definition.TimeValue, error)
- func GetNetworkTrafficOutHistoryOfVm(entityId, device string) ([]definition.TimeValue, error)
- func GetNetworkTrafficOutRankOfHosts() (*definition.MetricRank, error)
- func GetNetworkTrafficOutRankOfVms(stmt string) (*definition.MetricRank, error)
- func GetNodeRole() (string, error)
- func GetRepairingInfo() (*v1.ReairingInfo, error)
- func GetServicesToCheckHealth() []v1.Service
- func GetSupportFile(file support.File) (string, error)
- func GetSupportFileComment(file string) (*support.File, error)
- func GetSupportFileUrl(file support.File) string
- func GetTriggerPolicy() (*trigger.Policy, error)
- func GetTriggerPolicyByName(name string) (*trigger.Options, error)
- func GetTuning(name string) (*definition.Tuning, error)
- func GetTuningPolicy(filePath string) (*definition.TuningPolicy, error)
- func GetTuningValue(name string) (string, error)
- func GetUnhealthyServices() ([]v1.Service, error)
- func GetVmUsage() (*definition.VmUsage, error)
- func ImportClusterLicense(licensePath string) error
- func ImportNodeLicense(licensePath string) error
- func IsClusterSetReady() bool
- func IsEntityTypeValid(t string) bool
- func IsEventTypeValid(t string) bool
- func IsExpectedEmptyStdOut(err error) bool
- func IsGpuEnabled() bool
- func IsHaEnabled() (bool, error)
- func IsLocalDataCenter(dataCenter string) bool
- func IsMetricReportTypeValid(t string) bool
- func IsMetricTypeValid(t string) bool
- func IsModuleHealthy(moduleName string) bool
- func IsOvnSFlowEnabled() bool
- func IsRepairable() bool
- func IsRepairableModule(module string) bool
- func IsRepairing() bool
- func IsSupportFile(file string) bool
- func IsTriggerApplied(trigger trigger.Options) error
- func IsTriggerExist(name string) bool
- func IsTuningApplied(tuning definition.Tuning) error
- func IsTuningDeleted(tuning definition.Tuning) bool
- func IsValidService(service string) bool
- func IsValidServiceAndModule(service, module string) bool
- func ListBuiltInIntegrations() []definition.Integration
- func ListHostSupportFiles(opts support.ListFileOptions) ([]support.File, error)
- func ListHypervisors() ([]hypervisors.Hypervisor, error)
- func ListLicenses() ([]definition.License, error)
- func ListNodes() ([]definition.Node, error)
- func ListSupportFiles(opts support.ListFileOptions) ([]support.File, error)
- func ListSupportFilesFromOtherNodes() ([]support.File, error)
- func ListTunings(opts definition.ListTuningOptions) ([]definition.Tuning, error)
- func ListTuningsFromOtherNodes() (map[string][]definition.Tuning, error)
- func PutSupportFileToBucket(key string, file io.Reader) error
- func ReadSettingSys(settingName string) (string, error)
- func ReleaseTuningLock() error
- func RepairModule(moduleName string) error
- func RepairServiceHealth(service v1.Service) error
- func SetSupportFileComment(file support.File) error
- func SetUnhealthLogUrl(history *[]v1.HealthCheck)
- func SyncBucketSecret() error
- func SyncBucketStore() error
- func SyncDataCenterMetricsSummary()
- func SyncHealthHistory()
- func SyncSupportFiles()
- func SyncTriggers()
- func SyncTunings()
- func UploadSupportFileToObjectStore(supportFile support.File) error
- func VerifyLicense(license string) (*definition.VerificationDetails, error)
- type DataCenterSummary
- type Health
- type HealthStatus
- type HostSummary
- type HostUsage
- 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" CubeSysManagementNetwork = "cubesys.management" 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" )
Variables ¶
View Source
var ( OrderSensitiveServices = []definition.Service{ { Name: "clusterLink", Category: "core", Modules: []definition.Module{ {Name: "link", IsRepairable: false}, {Name: "clock", IsRepairable: true}, {Name: "dns", IsRepairable: false}, }, }, { Name: "clusterSys", Category: "core", Modules: []definition.Module{ {Name: "bootstrap", IsRepairable: false}, {Name: "license", IsRepairable: false}, }, }, { Name: "clusterSettings", Category: "core", Modules: []definition.Module{ {Name: "etcd", IsRepairable: true}, {Name: "nodelist", IsRepairable: false}, }, }, { Name: "haCluster", Category: "core", Modules: []definition.Module{ {Name: "hacluster", IsRepairable: true}, }, }, { Name: "msgQueue", Category: "core", Modules: []definition.Module{ {Name: "rabbitmq", IsRepairable: true}, }, }, { Name: "iaasDb", Category: "core", Modules: []definition.Module{ {Name: "mysql", IsRepairable: true}, {Name: "mongodb", IsRepairable: true}, }, }, { Name: "virtualIp", Category: "core", Modules: []definition.Module{ {Name: "vip", IsRepairable: true}, {Name: "haproxy_ha", IsRepairable: true}, }, }, { Name: "storage", Category: "storage", Modules: []definition.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: []definition.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: []definition.Module{ {Name: "k3s", IsRepairable: true}, {Name: "keycloak", IsRepairable: true}, }, }, { Name: "network", Category: "cloud computing", Modules: []definition.Module{ {Name: "neutron", IsRepairable: true}, }, }, { Name: "compute", Category: "cloud computing", Modules: []definition.Module{ {Name: "nova", IsRepairable: true}, {Name: "cyborg", IsRepairable: true}, }, }, { Name: "bareMetal", Category: "cloud computing", Modules: []definition.Module{ {Name: "ironic", IsRepairable: true}, }, }, { Name: "image", Category: "cloud computing", Modules: []definition.Module{ {Name: "glance", IsRepairable: true}, }, }, { Name: "blockStor", Category: "cloud computing", Modules: []definition.Module{ {Name: "cinder", IsRepairable: true}, }, }, { Name: "fileStor", Category: "cloud computing", Modules: []definition.Module{ {Name: "manila", IsRepairable: true}, }, }, { Name: "objectStor", Category: "cloud computing", Modules: []definition.Module{ {Name: "swift", IsRepairable: false}, }, }, { Name: "orchestration", Category: "cloud computing", Modules: []definition.Module{ {Name: "heat", IsRepairable: true}, }, }, { Name: "lbaas", Category: "cloud computing", Modules: []definition.Module{ {Name: "octavia", IsRepairable: true}, }, }, { Name: "dnsaas", Category: "cloud computing", Modules: []definition.Module{ {Name: "designate", IsRepairable: true}, }, }, { Name: "k8saas", Category: "cloud computing", Modules: []definition.Module{ {Name: "rancher", IsRepairable: false}, }, }, { Name: "instanceHa", Category: "cloud computing", Modules: []definition.Module{ {Name: "masakari", IsRepairable: true}, }, }, { Name: "businessLogic", Category: "cloud computing", Modules: []definition.Module{ {Name: "senlin", IsRepairable: true}, {Name: "watcher", IsRepairable: true}, }, }, { Name: "dataPipe", Category: "infrascope", Modules: []definition.Module{ {Name: "zookeeper", IsRepairable: true}, {Name: "kafka", IsRepairable: true}, }, }, { Name: "metrics", Category: "infrascope", Modules: []definition.Module{ {Name: "monasca", IsRepairable: true}, {Name: "telegraf", IsRepairable: true}, {Name: "grafana", IsRepairable: true}, }, }, { Name: "logAnalytics", Category: "infrascope", Modules: []definition.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: []definition.Module{ {Name: "influxdb", IsRepairable: true}, {Name: "kapacitor", IsRepairable: true}, }, }, { Name: "node", IsInternalViewOnly: true, Modules: []definition.Module{ {Name: "node", IsRepairable: false}, }, }, } Modules = map[string]definition.Module{} ModuleToService = map[string]string{} ServiceToCategory = map[string]string{} ServiceToModules = map[string][]definition.Module{} )
Functions ¶
func AcquireTuningLock ¶
func AcquireTuningLock() error
func ApplyTrigger ¶
func ApplyTriggers ¶
func ApplyTuning ¶
func ApplyTunings ¶
func ApplyTunings(tunings []definition.Tuning) error
func CheckServiceHealth ¶
func CountEvents ¶
func CreateSupportFile ¶
func CreateToken ¶
func CreateToken(user *definition.User) (*gocloak.JWT, error)
func GeDiskLatencyHistoryOfHosts ¶
func GeDiskLatencyHistoryOfHosts(readStmt, writeStmt string) (*definition.StorageTimeSeries, error)
func GetControllerVirtualIp ¶
func GetCpuAverageOfHosts ¶
func GetCpuAverageOfHosts(cpuStats []definition.ComputeStatistic) definition.ComputeStatistic
func GetCpuHistoryOfHost ¶
func GetCpuHistoryOfHost(stmt string) ([]definition.TimeValue, error)
func GetCpuHistoryOfVm ¶
func GetCpuHistoryOfVm(entityId string, period definition.Period) ([]definition.TimeValue, error)
func GetCpuSummaryOfHost ¶
func GetCpuSummaryOfHost(hostname string) (*definition.ComputeStatistic, error)
func GetCpuSummaryOfHosts ¶
func GetCpuSummaryOfHosts(stmt string) (*definition.ComputeStatistic, error)
func GetCpuUsageRankOfHosts ¶
func GetCpuUsageRankOfHosts(stmt string) (*definition.MetricRank, error)
func GetCpuUsageRankOfVms ¶
func GetCpuUsageRankOfVms(stmt string) (*definition.MetricRank, error)
func GetDataCenterName ¶
func GetDataCenterVersion ¶
func GetDiskIopsHistoryOfHosts ¶
func GetDiskIopsHistoryOfHosts(readStmt, writeStmt string) (*definition.StorageTimeSeries, error)
func GetDiskReadIopsHistoryOfVm ¶
func GetDiskReadIopsHistoryOfVm(entityId, device string) ([]definition.TimeValue, error)
func GetDiskReadIopsRankOfVms ¶
func GetDiskReadIopsRankOfVms(stmt string) (*definition.MetricRank, error)
func GetDiskStorageBandwidthHistory ¶
func GetDiskStorageBandwidthHistory(readStmt, writeStmt string) (*definition.StorageTimeSeries, error)
func GetDiskStorageSummaryOfHost ¶
func GetDiskStorageSummaryOfHost() (*definition.SpaceStatistic, error)
func GetDiskUsageHistoryOfHost ¶
func GetDiskUsageHistoryOfHost(entityId string, period definition.Period) ([]definition.TimeValue, error)
func GetDiskUsageRankOfHosts ¶
func GetDiskUsageRankOfHosts(stmt string) (*definition.MetricRank, error)
func GetDiskWriteIopsHistoryOfVm ¶
func GetDiskWriteIopsHistoryOfVm(entityId, device string) ([]definition.TimeValue, error)
func GetDiskWriteIopsRankOfVms ¶
func GetDiskWriteIopsRankOfVms(stmt string) (*definition.MetricRank, error)
func GetEventRank ¶
func GetEventRank(stmt string) ([]definition.EventStat, error)
func GetHostUsage ¶
func GetHostUsage(node definition.Node) (*definition.HostUsage, error)
func GetManagementIp ¶
func GetMemoryAverageOfHosts ¶
func GetMemoryAverageOfHosts(spaceStats []definition.SpaceStatistic) definition.SpaceStatistic
func GetMemoryHistoryOfHost ¶
func GetMemoryHistoryOfHost(stmt string) ([]definition.TimeValue, error)
func GetMemoryHistoryOfVm ¶
func GetMemoryHistoryOfVm(entityId string, period definition.Period) ([]definition.TimeValue, error)
func GetMemoryUsageRankOfHosts ¶
func GetMemoryUsageRankOfHosts(stmt string) (*definition.MetricRank, error)
func GetMemoryUsageRankOfVms ¶
func GetMemoryUsageRankOfVms(stmt string) (*definition.MetricRank, error)
func GetMemoryUsageSummaryOfHost ¶
func GetMemoryUsageSummaryOfHost(hostname string) (*definition.SpaceStatistic, error)
func GetMemoryUsageSummaryOfHosts ¶
func GetMemoryUsageSummaryOfHosts() (*definition.SpaceStatistic, error)
func GetMgmtNet ¶
func GetModuleHealthHistory ¶
func GetModuleHealthHistory(moduleName, duration, order string, onlyLast bool) ([]v1.HealthCheck, error)
func GetNetworkTrafficInHistoryOfHost ¶
func GetNetworkTrafficInHistoryOfHost(entityId string, period definition.Period) ([]definition.TimeValue, error)
func GetNetworkTrafficInHistoryOfVm ¶
func GetNetworkTrafficInHistoryOfVm(entityId, device string) ([]definition.TimeValue, error)
func GetNetworkTrafficInRankOfHosts ¶
func GetNetworkTrafficInRankOfHosts() (*definition.MetricRank, error)
func GetNetworkTrafficInRankOfVms ¶
func GetNetworkTrafficInRankOfVms(stmt string) (*definition.MetricRank, error)
func GetNetworkTrafficOutHistoryOfHost ¶
func GetNetworkTrafficOutHistoryOfHost(entityId string, period definition.Period) ([]definition.TimeValue, error)
func GetNetworkTrafficOutHistoryOfVm ¶
func GetNetworkTrafficOutHistoryOfVm(entityId, device string) ([]definition.TimeValue, error)
func GetNetworkTrafficOutRankOfHosts ¶
func GetNetworkTrafficOutRankOfHosts() (*definition.MetricRank, error)
func GetNetworkTrafficOutRankOfVms ¶
func GetNetworkTrafficOutRankOfVms(stmt string) (*definition.MetricRank, error)
func GetNodeRole ¶
func GetRepairingInfo ¶
func GetRepairingInfo() (*v1.ReairingInfo, error)
func GetSupportFileUrl ¶
func GetTriggerPolicy ¶
func GetTuningPolicy ¶
func GetTuningPolicy(filePath string) (*definition.TuningPolicy, error)
func GetTuningValue ¶
func GetUnhealthyServices ¶
func GetVmUsage ¶
func GetVmUsage() (*definition.VmUsage, error)
func ImportClusterLicense ¶
note: currently, the COS license import result is not clear by identifying the return code because it will still return 0 even if the result is not ok. see ticket to know more https://github.com/bigstack-oss/cubecos/issues/29
func ImportNodeLicense ¶
func IsClusterSetReady ¶
func IsClusterSetReady() bool
func IsEntityTypeValid ¶
func IsEventTypeValid ¶
func IsExpectedEmptyStdOut ¶
func IsGpuEnabled ¶
func IsGpuEnabled() bool
func IsHaEnabled ¶
func IsLocalDataCenter ¶
M2 TODO: Check if the data center is local
func IsMetricReportTypeValid ¶
func IsMetricTypeValid ¶
func IsModuleHealthy ¶
func IsOvnSFlowEnabled ¶
func IsOvnSFlowEnabled() bool
func IsRepairable ¶
func IsRepairable() bool
func IsRepairableModule ¶
func IsRepairing ¶
func IsRepairing() bool
func IsSupportFile ¶
func IsTriggerApplied ¶
func IsTriggerExist ¶
func IsTuningApplied ¶
func IsTuningApplied(tuning definition.Tuning) error
func IsTuningDeleted ¶
func IsTuningDeleted(tuning definition.Tuning) bool
func IsValidService ¶
func IsValidServiceAndModule ¶
func ListBuiltInIntegrations ¶
func ListBuiltInIntegrations() []definition.Integration
func ListHostSupportFiles ¶
func ListHostSupportFiles(opts support.ListFileOptions) ([]support.File, error)
func ListHypervisors ¶
func ListHypervisors() ([]hypervisors.Hypervisor, error)
func ListLicenses ¶
func ListLicenses() ([]definition.License, error)
func ListNodes ¶
func ListNodes() ([]definition.Node, error)
func ListSupportFiles ¶
func ListSupportFiles(opts support.ListFileOptions) ([]support.File, error)
func ListTunings ¶
func ListTunings(opts definition.ListTuningOptions) ([]definition.Tuning, error)
func ListTuningsFromOtherNodes ¶
func ListTuningsFromOtherNodes() (map[string][]definition.Tuning, error)
func ReadSettingSys ¶
func ReleaseTuningLock ¶
func ReleaseTuningLock() error
func RepairModule ¶
func RepairServiceHealth ¶
func SetSupportFileComment ¶
func SetUnhealthLogUrl ¶
func SetUnhealthLogUrl(history *[]v1.HealthCheck)
func SyncBucketSecret ¶
func SyncBucketSecret() error
func SyncBucketStore ¶
func SyncBucketStore() error
func SyncDataCenterMetricsSummary ¶
func SyncDataCenterMetricsSummary()
func SyncHealthHistory ¶
func SyncHealthHistory()
func SyncSupportFiles ¶
func SyncSupportFiles()
func SyncTriggers ¶
func SyncTriggers()
func SyncTunings ¶
func SyncTunings()
func VerifyLicense ¶
func VerifyLicense(license string) (*definition.VerificationDetails, error)
Types ¶
type DataCenterSummary ¶
type DataCenterSummary struct {
Usage definition.DataCenterUsage `json:"usage"`
}
func GetDataCenterUsage ¶
func GetDataCenterUsage(hostSummary *HostSummary) (*DataCenterSummary, error)
type Health ¶
type Health struct { *v1.DataCenter `json:"dataCenter,omitempty" bson:"dataCenter,omitempty"` *Overall `json:"overall,omitempty" bson:"overall"` Services []v1.Service `json:"services" bson:"services"` }
func GetHealthSummary ¶
func (*Health) CopyEmptyServiceStruct ¶
func (*Health) HasUnhealthyService ¶
func (*Health) SetRepairingStatus ¶
type HealthStatus ¶
type HealthStatus struct { Category string `json:"category"` Name string `json:"name"` Module string `json:"module"` IsRepairable bool `json:"isRepairable"` History []v1.HealthCheck `json:"history"` }
func GetServiceHealthHistory ¶
func GetServiceHealthHistory(serviceName, duration string) []HealthStatus
type HostSummary ¶
func GetHostSummary ¶
func GetHostSummary() (*HostSummary, error)
func (*HostSummary) ListCpuUsages ¶
func (h *HostSummary) ListCpuUsages() []definition.ComputeStatistic
func (*HostSummary) ListMemoryUsages ¶
func (h *HostSummary) ListMemoryUsages() []definition.SpaceStatistic
func (*HostSummary) SetHostUsageByNodes ¶
func (h *HostSummary) SetHostUsageByNodes(nodes []definition.Node)
func (*HostSummary) SetRoleUsageByHosts ¶
func (h *HostSummary) SetRoleUsageByHosts()
type HostUsage ¶
type HostUsage struct { Role string `json:"role"` Name string `json:"name"` Address string `json:"address"` Cpu definition.ComputeStatistic `json:"cpu"` Memory definition.SpaceStatistic `json:"memory"` }
type Role ¶
type Role struct { ControlConverged RoleUsage `json:"controlConverged"` Control RoleUsage `json:"control"` Compute RoleUsage `json:"compute"` Storage RoleUsage `json:"storage"` EdgeCore RoleUsage `json:"edgeCore"` Moderator RoleUsage `json:"moderator"` }
func GetRoleStatus ¶
type RoleUsage ¶
type RoleUsage struct { Count int `json:"count"` Cpu definition.ComputeStatistic `json:"cpu"` Memory definition.SpaceStatistic `json:"memory"` }
type Summary ¶
type Summary struct { DataCenter DataCenterSummary `json:"dataCenter"` Host HostSummary `json:"host"` Vm VmSummary `json:"vm"` }
func GetMetricsSummary ¶
func GetMetricsSummary() *Summary
type VmStatus ¶
type VmStatus struct { Total int `json:"total"` Running int `json:"running"` Stopped int `json:"stopped"` Suspend int `json:"suspend"` Paused int `json:"paused"` Error int `json:"error"` }
func GetVmStatus ¶
type VmSummary ¶
type VmSummary struct { Status VmStatus `json:"status"` definition.VmUsage `json:"usage"` }
func GetVmSummary ¶
Click to show internal directories.
Click to hide internal directories.