Documentation
¶
Index ¶
- Constants
- Variables
- func AcquireTuningLock() error
- 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 trigger.CosOptions) error
- func ApplyTuning(isolatedDir string) error
- func ApplyTunings(tunings []v1.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 *v1.User) (*gocloak.JWT, error)
- func DeleteAndCreateEmailRecipient(setting setting.Options) error
- func DeleteAndCreateSlackChannel(setting setting.Options) error
- func DeleteEmailRecipient(address string) error
- func DeleteEmailSender() error
- func DeleteSlackChannel(url string) error
- func GeDiskLatencyHistoryOfHosts(readStmt, writeStmt string) (*v1.StorageTimeSeries, error)
- func GenModuleHealthHistoryQuery(moduleName, past, order string, onlyLast bool) string
- func GetAlertSetting() (*setting.CosAlert, error)
- func GetClusterVirtualIp() (string, error)
- func GetControllerVirtualIp(mgmtNet string) (string, error)
- func GetCpuAverageOfHosts(cpuStats []v1.ComputeStatistic) v1.ComputeStatistic
- func GetCpuHistoryOfHost(stmt string) (*v1.MetricHistory, error)
- func GetCpuHistoryOfVm(entityId string, period v1.Period) ([]v1.TimeValue, error)
- func GetCpuSummaryOfHost(hostname string) (*v1.ComputeStatistic, error)
- func GetCpuSummaryOfHosts(stmt string) (*v1.ComputeStatistic, error)
- func GetCpuUsageRankOfHosts(stmt string) (*v1.MetricRank, error)
- func GetCpuUsageRankOfVms(stmt string) (*v1.MetricRank, error)
- func GetDataCenterName() (string, error)
- func GetDataCenterNumericVersion() (string, error)
- func GetDataCenterVersion() (string, error)
- func GetDiskIopsHistoryOfHosts(readStmt, writeStmt string) (*v1.StorageTimeSeries, error)
- func GetDiskReadIopsHistoryOfVm(entityId, device string) ([]v1.TimeValue, error)
- func GetDiskReadIopsRankOfVms(stmt string) (*v1.MetricRank, error)
- func GetDiskStorageBandwidthHistory(readStmt, writeStmt string) (*v1.StorageTimeSeries, error)
- func GetDiskStorageSummaryOfHost() (*v1.SpaceStatistic, error)
- func GetDiskUsageHistoryOfHost(entityId string, period v1.Period) ([]v1.TimeValue, error)
- func GetDiskUsageRankOfHosts(stmt string) (*v1.MetricRank, error)
- func GetDiskWriteIopsHistoryOfVm(entityId, device string) ([]v1.TimeValue, error)
- func GetDiskWriteIopsRankOfVms(stmt string) (*v1.MetricRank, 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 GetHostUsage(node v1.Node) (*v1.HostUsage, error)
- func GetManagementIp(mgmtNet string) (string, error)
- func GetManagementNet() (string, error)
- func GetMemoryAverageOfHosts(spaceStats []v1.SpaceStatistic) v1.SpaceStatistic
- func GetMemoryHistoryOfHost(stmt string) ([]v1.TimeValue, error)
- func GetMemoryHistoryOfVm(entityId string, period v1.Period) ([]v1.TimeValue, error)
- func GetMemorySizeHistoryOfHost(stmt string) (*v1.MetricHistory, error)
- func GetMemoryUsageRankOfHosts(stmt string) (*v1.MetricRank, error)
- func GetMemoryUsageRankOfVms(stmt string) (*v1.MetricRank, error)
- func GetMemoryUsageSummaryOfHost(hostname string) (*v1.SpaceStatistic, error)
- func GetMemoryUsageSummaryOfHosts() (*v1.SpaceStatistic, error)
- func GetModuleHealthHistory(moduleName, duration, order string, onlyLast bool) ([]v1.HealthCheck, error)
- func GetNetworkTrafficInHistoryOfHost(entityId string, period v1.Period) ([]v1.TimeValue, error)
- func GetNetworkTrafficInHistoryOfVm(entityId, device string) ([]v1.TimeValue, error)
- func GetNetworkTrafficInRankOfHosts() (*v1.MetricRank, error)
- func GetNetworkTrafficInRankOfVms(stmt string) (*v1.MetricRank, error)
- func GetNetworkTrafficOutHistoryOfHost(entityId string, period v1.Period) ([]v1.TimeValue, error)
- func GetNetworkTrafficOutHistoryOfVm(entityId, device string) ([]v1.TimeValue, error)
- func GetNetworkTrafficOutRankOfHosts() (*v1.MetricRank, error)
- func GetNetworkTrafficOutRankOfVms(stmt string) (*v1.MetricRank, error)
- func GetNodeRole() (string, error)
- func GetOpenSearchRequestLink(requestId string) (string, error)
- func GetRepairingInfo() (*v1.ReairingInfo, error)
- func GetServicesToCheckHealth() []v1.Service
- func GetSlackChannel(channel string) (slack.CosChannel, error)
- func GetSlackChannels() ([]slack.CosChannel, error)
- func GetSourceAlertSetting() (*setting.CosAlert, error)
- func GetSourceNodeMap() (map[string]v1.Node, error)
- func GetSourceTuning(name string) (*v1.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() ([]trigger.CosOptions, error)
- func GetTuningPolicy(filePath string) (*v1.TuningPolicy, error)
- func GetTuningValue(name string) (string, error)
- func GetUnhealthyServices() ([]v1.Service, error)
- func GetVmUsage() (*v1.VmUsage, 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 IsMetricTypeValid(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 setting.Options) bool
- func IsSupportFile(file string) bool
- func IsTriggerExist(name string) bool
- func IsTuningApplied(tuning v1.Tuning) error
- func IsTuningDeleted(tuning v1.Tuning) bool
- func IsValidService(service string) bool
- func IsValidServiceAndModule(service, module string) bool
- func ListBuiltInIntegrations() []v1.Integration
- func ListEvents(stmt string) ([]event.Options, error)
- func ListHostSupportFiles(opts support.ListFileOptions) ([]support.File, error)
- func ListLicenses() ([]license.Options, error)
- func ListSupportFiles(opts support.ListFileOptions) ([]support.File, error)
- func ListSupportFilesFromOtherNodes() ([]support.File, error)
- func ListTunings(opts v1.ListTuningOptions) ([]v1.Tuning, error)
- func ListTuningsFromOtherNodes() (map[string][]v1.Tuning, error)
- func ParseLicenseExpiryAndStatus(value string) (license.Expiry, status.License)
- func PutSupportFileToBucket(key string, file io.Reader) error
- func ReadSettingSys(settingName string) (string, error)
- func ReleaseTuningLock() error
- func RemovePendingReq(db, collection string)
- func RepairModule(moduleName string) error
- func RepairServiceHealth(service v1.Service) error
- func SetSupportFileComment(file support.File) error
- func SetUnhealthLogUrl(history *[]v1.HealthCheck)
- 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) (*license.Verification, error)
- func WriteFakePolicyFile(policy *setting.CosAlert)
- type DataCenterSummary
- type Health
- type HostSummary
- type HostUsage
- type Ip
- type ModuleHealth
- type Node
- type Overall
- type Role
- type RoleUsage
- type Summary
- type VmStatus
- type VmSummary
Constants ¶
const ( LicenseValid = 1 LicenseExpired = 251 LicenseNotInstalled = 252 LicenseInvalidHardware = 253 LicenseInvalidSignature = 254 LicenseSysytemCompromised = 255 )
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" )
const (
EtcNodeInventory = "/etc/settings.cluster.json"
)
Variables ¶
var ( OrderSensitiveServices = []v1.Service{ { Name: "clusterLink", Category: "core", Modules: []v1.Module{ {Name: "link", IsRepairable: false}, {Name: "clock", IsRepairable: true}, {Name: "dns", IsRepairable: false}, }, }, { Name: "clusterSys", Category: "core", Modules: []v1.Module{ {Name: "bootstrap", IsRepairable: false}, {Name: "license", IsRepairable: false}, }, }, { Name: "clusterSettings", Category: "core", Modules: []v1.Module{ {Name: "etcd", IsRepairable: true}, {Name: "nodelist", IsRepairable: false}, {Name: "mongodb", IsRepairable: true}, }, }, { Name: "haCluster", Category: "core", Modules: []v1.Module{ {Name: "hacluster", IsRepairable: true}, }, }, { Name: "msgQueue", Category: "core", Modules: []v1.Module{ {Name: "rabbitmq", IsRepairable: true}, }, }, { Name: "iaasDb", Category: "core", Modules: []v1.Module{ {Name: "mysql", IsRepairable: true}, }, }, { Name: "virtualIp", Category: "core", Modules: []v1.Module{ {Name: "vip", IsRepairable: true}, {Name: "haproxy_ha", IsRepairable: true}, }, }, { Name: "storage", Category: "storage", Modules: []v1.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: []v1.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: []v1.Module{ {Name: "k3s", IsRepairable: true}, {Name: "keycloak", IsRepairable: true}, }, }, { Name: "network", Category: "cloud computing", Modules: []v1.Module{ {Name: "neutron", IsRepairable: true}, }, }, { Name: "compute", Category: "cloud computing", Modules: []v1.Module{ {Name: "nova", IsRepairable: true}, {Name: "cyborg", IsRepairable: true}, }, }, { Name: "bareMetal", Category: "cloud computing", Modules: []v1.Module{ {Name: "ironic", IsRepairable: true}, }, }, { Name: "image", Category: "cloud computing", Modules: []v1.Module{ {Name: "glance", IsRepairable: true}, }, }, { Name: "blockStor", Category: "cloud computing", Modules: []v1.Module{ {Name: "cinder", IsRepairable: true}, }, }, { Name: "fileStor", Category: "cloud computing", Modules: []v1.Module{ {Name: "manila", IsRepairable: true}, }, }, { Name: "objectStor", Category: "cloud computing", Modules: []v1.Module{ {Name: "swift", IsRepairable: false}, }, }, { Name: "orchestration", Category: "cloud computing", Modules: []v1.Module{ {Name: "heat", IsRepairable: true}, }, }, { Name: "lbaas", Category: "cloud computing", Modules: []v1.Module{ {Name: "octavia", IsRepairable: true}, }, }, { Name: "dnsaas", Category: "cloud computing", Modules: []v1.Module{ {Name: "designate", IsRepairable: true}, }, }, { Name: "k8saas", Category: "cloud computing", Modules: []v1.Module{ {Name: "rancher", IsRepairable: false}, }, }, { Name: "instanceHa", Category: "cloud computing", Modules: []v1.Module{ {Name: "masakari", IsRepairable: true}, }, }, { Name: "businessLogic", Category: "cloud computing", Modules: []v1.Module{ {Name: "senlin", IsRepairable: true}, {Name: "watcher", IsRepairable: true}, }, }, { Name: "dataPipe", Category: "infrascope", Modules: []v1.Module{ {Name: "zookeeper", IsRepairable: true}, {Name: "kafka", IsRepairable: true}, }, }, { Name: "metrics", Category: "infrascope", Modules: []v1.Module{ {Name: "monasca", IsRepairable: true}, {Name: "telegraf", IsRepairable: true}, {Name: "grafana", IsRepairable: true}, }, }, { Name: "logAnalytics", Category: "infrascope", Modules: []v1.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: []v1.Module{ {Name: "influxdb", IsRepairable: true}, {Name: "kapacitor", IsRepairable: true}, }, }, { Name: "node", IsInternalViewOnly: true, Modules: []v1.Module{ {Name: "node", IsRepairable: false}, }, }, } Modules = map[string]v1.Module{} ModuleToService = map[string]string{} ServiceToCategory = map[string]string{} ServiceToModules = map[string][]v1.Module{} )
Functions ¶
func AcquireTuningLock ¶
func AcquireTuningLock() error
func ApplyEmailRecipient ¶
func ApplyEmailSender ¶
func ApplySlackChannel ¶
func ApplySlackChannel(channel slack.CosChannel) error
func ApplyTitlePrefix ¶
func ApplyTrigger ¶
func ApplyTrigger(trigger trigger.CosOptions) error
func ApplyTuning ¶
func ApplyTunings ¶
func CheckServiceHealth ¶
func CountEvents ¶
func CreateSupportFile ¶
func CreateToken ¶
func DeleteEmailRecipient ¶
func DeleteEmailSender ¶
func DeleteEmailSender() error
func DeleteSlackChannel ¶
func GeDiskLatencyHistoryOfHosts ¶
func GeDiskLatencyHistoryOfHosts(readStmt, writeStmt string) (*v1.StorageTimeSeries, error)
func GetAlertSetting ¶
func GetClusterVirtualIp ¶
func GetControllerVirtualIp ¶
func GetCpuAverageOfHosts ¶
func GetCpuAverageOfHosts(cpuStats []v1.ComputeStatistic) v1.ComputeStatistic
func GetCpuHistoryOfHost ¶
func GetCpuHistoryOfHost(stmt string) (*v1.MetricHistory, error)
func GetCpuHistoryOfVm ¶
func GetCpuSummaryOfHost ¶
func GetCpuSummaryOfHost(hostname string) (*v1.ComputeStatistic, error)
func GetCpuSummaryOfHosts ¶
func GetCpuSummaryOfHosts(stmt string) (*v1.ComputeStatistic, error)
func GetCpuUsageRankOfHosts ¶
func GetCpuUsageRankOfHosts(stmt string) (*v1.MetricRank, error)
func GetCpuUsageRankOfVms ¶
func GetCpuUsageRankOfVms(stmt string) (*v1.MetricRank, error)
func GetDataCenterName ¶
func GetDataCenterVersion ¶
func GetDiskIopsHistoryOfHosts ¶
func GetDiskIopsHistoryOfHosts(readStmt, writeStmt string) (*v1.StorageTimeSeries, error)
func GetDiskReadIopsRankOfVms ¶
func GetDiskReadIopsRankOfVms(stmt string) (*v1.MetricRank, error)
func GetDiskStorageBandwidthHistory ¶
func GetDiskStorageBandwidthHistory(readStmt, writeStmt string) (*v1.StorageTimeSeries, error)
func GetDiskStorageSummaryOfHost ¶
func GetDiskStorageSummaryOfHost() (*v1.SpaceStatistic, error)
func GetDiskUsageRankOfHosts ¶
func GetDiskUsageRankOfHosts(stmt string) (*v1.MetricRank, error)
func GetDiskWriteIopsRankOfVms ¶
func GetDiskWriteIopsRankOfVms(stmt string) (*v1.MetricRank, error)
func GetEmailRecipients ¶
func GetEmailSenders ¶
func GetManagementIp ¶
func GetManagementNet ¶
func GetMemoryAverageOfHosts ¶
func GetMemoryAverageOfHosts(spaceStats []v1.SpaceStatistic) v1.SpaceStatistic
func GetMemoryHistoryOfVm ¶
func GetMemorySizeHistoryOfHost ¶
func GetMemorySizeHistoryOfHost(stmt string) (*v1.MetricHistory, error)
func GetMemoryUsageRankOfHosts ¶
func GetMemoryUsageRankOfHosts(stmt string) (*v1.MetricRank, error)
func GetMemoryUsageRankOfVms ¶
func GetMemoryUsageRankOfVms(stmt string) (*v1.MetricRank, error)
func GetMemoryUsageSummaryOfHost ¶
func GetMemoryUsageSummaryOfHost(hostname string) (*v1.SpaceStatistic, error)
func GetMemoryUsageSummaryOfHosts ¶
func GetMemoryUsageSummaryOfHosts() (*v1.SpaceStatistic, error)
func GetModuleHealthHistory ¶
func GetModuleHealthHistory(moduleName, duration, order string, onlyLast bool) ([]v1.HealthCheck, error)
func GetNetworkTrafficInRankOfHosts ¶
func GetNetworkTrafficInRankOfHosts() (*v1.MetricRank, error)
func GetNetworkTrafficInRankOfVms ¶
func GetNetworkTrafficInRankOfVms(stmt string) (*v1.MetricRank, error)
func GetNetworkTrafficOutRankOfHosts ¶
func GetNetworkTrafficOutRankOfHosts() (*v1.MetricRank, error)
func GetNetworkTrafficOutRankOfVms ¶
func GetNetworkTrafficOutRankOfVms(stmt string) (*v1.MetricRank, error)
func GetNodeRole ¶
func GetRepairingInfo ¶
func GetRepairingInfo() (*v1.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 GetTriggers() ([]trigger.CosOptions, error)
func GetTuningPolicy ¶
func GetTuningPolicy(filePath string) (*v1.TuningPolicy, error)
func GetTuningValue ¶
func GetUnhealthyServices ¶
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 if 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 IsMetricTypeValid ¶
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 IsValidService ¶
func IsValidServiceAndModule ¶
func ListBuiltInIntegrations ¶
func ListBuiltInIntegrations() []v1.Integration
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 v1.ListTuningOptions) ([]v1.Tuning, error)
func ReadSettingSys ¶
func ReleaseTuningLock ¶
func ReleaseTuningLock() error
func RemovePendingReq ¶
func RemovePendingReq(db, collection string)
func RepairModule ¶
func RepairServiceHealth ¶
func SetSupportFileComment ¶
func SetUnhealthLogUrl ¶
func SetUnhealthLogUrl(history *[]v1.HealthCheck)
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) (*license.Verification, error)
func WriteFakePolicyFile ¶
Types ¶
type DataCenterSummary ¶
type DataCenterSummary struct {
Usage v1.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 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() []v1.ComputeStatistic
func (*HostSummary) ListMemoryUsages ¶
func (h *HostSummary) ListMemoryUsages() []v1.SpaceStatistic
func (*HostSummary) SetHostUsageByNodes ¶
func (h *HostSummary) SetHostUsageByNodes(nodes []v1.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 v1.ComputeStatistic `json:"cpu"` Memory v1.SpaceStatistic `json:"memory"` }
type ModuleHealth ¶
type ModuleHealth struct { Category string `json:"category"` Name string `json:"name"` Module string `json:"module"` IsRepairable bool `json:"isRepairable"` History []v1.HealthCheck `json:"history"` Status status.Health `json:"status"` }
func GetServiceHealthHistory ¶
func GetServiceHealthHistory(serviceName, duration string) []ModuleHealth
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 v1.ComputeStatistic `json:"cpu"` Memory v1.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