Documentation ¶
Index ¶
- Constants
- Variables
- func Init(influxCfg *influxdb.Config)
- type AlertInterface
- func NewKeycodeMetrics(keycodeCfg *KeycodeConfig, influxCfg *influxdb.Config) []AlertInterface
- func NewLicenseCapacity(capacityCfg *LicenseCapacityConfig, influxCfg *influxdb.Config) []AlertInterface
- func NewLicenseMetrics(licenseCfg *LicenseConfig, influxCfg *influxdb.Config) []AlertInterface
- func NewMeteringMetrics(meteringCfg *MeteringConfig, influxCfg *influxdb.Config) []AlertInterface
- type AlertMetrics
- func (c *AlertMetrics) ClearEventPosted()
- func (c *AlertMetrics) GenerateCriteria()
- func (c *AlertMetrics) GetCategory() string
- func (c *AlertMetrics) GetEnabled() bool
- func (c *AlertMetrics) GetName() string
- func (c *AlertMetrics) GetSpecs() string
- func (c *AlertMetrics) GetType() string
- func (c *AlertMetrics) MeetCriteria() bool
- func (c *AlertMetrics) Validate()
- type CriteriaType
- type KeycodeConfig
- type KeycodeExpiration
- type LicenseCapacityCPU
- type LicenseCapacityConfig
- type LicenseConfig
- type MeteringConfig
- type MeteringFederatorai
- type Notifier
Constants ¶
View Source
const ( DefaultKeycodeExpirationSpecs = "0 0 * * * *" DefaultKeycodeExpirationEventInterval = "90,60,30,15,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7" DefaultKeycodeExpirationEventLevel = "90:Info,15:Warn,0:Error" )
View Source
const ( DefaultLicenseCapacityCPUSpecs = "0 0 * * * *" DefaultLicenseCapacityCPUEventInterval = "14,13,12,11,10,9,8,7,6,5,4,3,2,1,0" DefaultLicenseCapacityCPUEventLevel = "14:Warn,0:Error" )
View Source
const ( CPUCoresGracePeriod = "Number of CPU cores exceed the licensed number of CPU cores, grace period will expire on %s" CPUCoresExceed = "Number of CPU cores exceed the licensed number of CPU cores" )
View Source
const ( DefaultMeteringFederatoraiEnabled = true DefaultMeteringFederatoraiSpecs = "0 0 0 * * *" )
Variables ¶
View Source
var ( KeycodeMgt *keycodes.KeycodeMgt SchemaMgt *schemamgt.SchemaManagement )
Functions ¶
Types ¶
type AlertInterface ¶
type AlertInterface interface { GetName() string GetType() string GetCategory() string GetSpecs() string GetEnabled() bool MeetCriteria() bool Validate() GenerateCriteria() ClearEventPosted() }
func NewKeycodeMetrics ¶
func NewKeycodeMetrics(keycodeCfg *KeycodeConfig, influxCfg *influxdb.Config) []AlertInterface
func NewLicenseCapacity ¶
func NewLicenseCapacity(capacityCfg *LicenseCapacityConfig, influxCfg *influxdb.Config) []AlertInterface
func NewLicenseMetrics ¶
func NewLicenseMetrics(licenseCfg *LicenseConfig, influxCfg *influxdb.Config) []AlertInterface
func NewMeteringMetrics ¶
func NewMeteringMetrics(meteringCfg *MeteringConfig, influxCfg *influxdb.Config) []AlertInterface
type AlertMetrics ¶
type AlertMetrics struct {
// contains filtered or unexported fields
}
func (*AlertMetrics) ClearEventPosted ¶
func (c *AlertMetrics) ClearEventPosted()
func (*AlertMetrics) GenerateCriteria ¶
func (c *AlertMetrics) GenerateCriteria()
func (*AlertMetrics) GetCategory ¶
func (c *AlertMetrics) GetCategory() string
func (*AlertMetrics) GetEnabled ¶
func (c *AlertMetrics) GetEnabled() bool
func (*AlertMetrics) GetName ¶
func (c *AlertMetrics) GetName() string
func (*AlertMetrics) GetSpecs ¶
func (c *AlertMetrics) GetSpecs() string
func (*AlertMetrics) GetType ¶
func (c *AlertMetrics) GetType() string
func (*AlertMetrics) MeetCriteria ¶
func (c *AlertMetrics) MeetCriteria() bool
func (*AlertMetrics) Validate ¶
func (c *AlertMetrics) Validate()
type CriteriaType ¶
type CriteriaType int
const ( CriteriaTypeUndefined CriteriaType = 0 CriteriaTypeGauge CriteriaType = 1 CriteriaTypeContinuous CriteriaType = 2 )
type KeycodeConfig ¶
type KeycodeConfig struct { Enabled bool `mapstructure:"enabled"` Expiration *Notifier `mapstructure:"expiration"` }
func NewDefaultKeycodeConfig ¶
func NewDefaultKeycodeConfig() *KeycodeConfig
type KeycodeExpiration ¶
type KeycodeExpiration struct { AlertMetrics // contains filtered or unexported fields }
func NewKeycodeExpiration ¶
func NewKeycodeExpiration(notifier *Notifier, influxCfg *influxdb.Config) *KeycodeExpiration
func (*KeycodeExpiration) MeetCriteria ¶
func (c *KeycodeExpiration) MeetCriteria() bool
func (*KeycodeExpiration) PostEvent ¶
func (c *KeycodeExpiration) PostEvent() error
func (*KeycodeExpiration) Validate ¶
func (c *KeycodeExpiration) Validate()
type LicenseCapacityCPU ¶
type LicenseCapacityCPU struct { AlertMetrics // contains filtered or unexported fields }
func NewLicenseCapacityCPU ¶
func NewLicenseCapacityCPU(notifier *Notifier, influxCfg *influxdb.Config) *LicenseCapacityCPU
func (*LicenseCapacityCPU) MeetCriteria ¶
func (c *LicenseCapacityCPU) MeetCriteria() bool
func (*LicenseCapacityCPU) PostEvent ¶
func (c *LicenseCapacityCPU) PostEvent() error
func (*LicenseCapacityCPU) Validate ¶
func (c *LicenseCapacityCPU) Validate()
type LicenseCapacityConfig ¶
type LicenseConfig ¶
type LicenseConfig struct { Enabled bool `mapstructure:"enabled"` Capacity *LicenseCapacityConfig `mapstructure:"capacity"` }
func NewDefaultLicenseConfig ¶
func NewDefaultLicenseConfig() *LicenseConfig
type MeteringConfig ¶
type MeteringConfig struct { Enabled bool `mapstructure:"enabled"` Federatorai *Notifier `mapstructure:"federatorai"` }
func NewDefaultMeteringConfig ¶
func NewDefaultMeteringConfig() *MeteringConfig
type MeteringFederatorai ¶
type MeteringFederatorai struct { AlertMetrics // contains filtered or unexported fields }
func NewMeteringFederatorai ¶
func NewMeteringFederatorai(notifier *Notifier, influxCfg *influxdb.Config) *MeteringFederatorai
func (*MeteringFederatorai) Validate ¶
func (c *MeteringFederatorai) Validate()
Click to show internal directories.
Click to hide internal directories.