Documentation
¶
Index ¶
- Constants
- Variables
- func AddMetric(m AnkaMetric)
- func ConvertMetricToGauge(m prometheus.Collector) (prometheus.Gauge, error)
- func ConvertMetricToGaugeVec(m prometheus.Collector) (*prometheus.GaugeVec, error)
- func ConvertToInstancesData(d interface{}) ([]types.Instance, error)
- func ConvertToNodeData(d interface{}) ([]types.Node, error)
- func ConvertToRegistryDiskData(d interface{}) (*types.RegistryDisk, error)
- func ConvertToRegistryTemplatesData(d interface{}) ([]types.Template, error)
- func CreateGaugeMetric(name string, help string) prometheus.Gauge
- func CreateGaugeMetricVec(name string, help string, labels []string) *prometheus.GaugeVec
- type AnkaMetric
- type BaseAnkaMetric
- type InstanceStateMetric
- type InstanceStatePerMetric
- type NodeGroupMetric
- type NodeMetric
- type NodeStatesMetric
- type NodesMetric
- type RegistryDiskMetric
- type RegistryTemplateMetric
- type RegistryTemplatesMetric
Constants ¶
View Source
const DEFAULT_REFRESH_METRIC_SECONDS = 600
Variables ¶
View Source
var MetricsHolder []AnkaMetric
Functions ¶
func AddMetric ¶
func AddMetric(m AnkaMetric)
func ConvertMetricToGauge ¶
func ConvertMetricToGauge(m prometheus.Collector) (prometheus.Gauge, error)
func ConvertMetricToGaugeVec ¶
func ConvertMetricToGaugeVec(m prometheus.Collector) (*prometheus.GaugeVec, error)
func ConvertToInstancesData ¶
func ConvertToNodeData ¶
func ConvertToRegistryDiskData ¶
func ConvertToRegistryDiskData(d interface{}) (*types.RegistryDisk, error)
func CreateGaugeMetric ¶
func CreateGaugeMetric(name string, help string) prometheus.Gauge
func CreateGaugeMetricVec ¶
func CreateGaugeMetricVec(name string, help string, labels []string) *prometheus.GaugeVec
Types ¶
type AnkaMetric ¶
type AnkaMetric interface {
GetPrometheusMetric() prometheus.Collector
GetEvent() events.Event
GetEventHandler() func(interface{}) error
}
type BaseAnkaMetric ¶
type BaseAnkaMetric struct {
// contains filtered or unexported fields
}
func (BaseAnkaMetric) GetEvent ¶
func (bam BaseAnkaMetric) GetEvent() events.Event
func (BaseAnkaMetric) GetPrometheusMetric ¶
func (bam BaseAnkaMetric) GetPrometheusMetric() prometheus.Collector
type InstanceStateMetric ¶
type InstanceStateMetric struct {
BaseAnkaMetric
}
func (InstanceStateMetric) GetEventHandler ¶
func (ism InstanceStateMetric) GetEventHandler() func(interface{}) error
type InstanceStatePerMetric ¶
type InstanceStatePerMetric struct {
BaseAnkaMetric
HandleData func([]types.Instance, *prometheus.GaugeVec)
}
func (InstanceStatePerMetric) GetEventHandler ¶
func (ispm InstanceStatePerMetric) GetEventHandler() func(interface{}) error
type NodeGroupMetric ¶
type NodeGroupMetric struct {
BaseAnkaMetric
HandleData func([]types.Node, []types.NodeGroup, *prometheus.GaugeVec)
}
func (NodeGroupMetric) GetEventHandler ¶
func (ngm NodeGroupMetric) GetEventHandler() func(interface{}) error
type NodeMetric ¶
type NodeMetric struct {
BaseAnkaMetric
HandleData func([]types.Node, *prometheus.GaugeVec)
}
TODO: can we make prometheus.GaugeVec support also .Gauge?
func (NodeMetric) GetEventHandler ¶
func (nm NodeMetric) GetEventHandler() func(interface{}) error
type NodeStatesMetric ¶
type NodeStatesMetric struct {
BaseAnkaMetric
HandleData func([]types.Node, *prometheus.GaugeVec)
}
TODO: can we make prometheus.GaugeVec support also .Gauge?
func (NodeStatesMetric) GetEventHandler ¶
func (nsm NodeStatesMetric) GetEventHandler() func(interface{}) error
type NodesMetric ¶
type NodesMetric struct {
BaseAnkaMetric
HandleData func([]types.Node, prometheus.Gauge, *prometheus.GaugeVec)
}
func (NodesMetric) GetEventHandler ¶
func (nm NodesMetric) GetEventHandler() func(interface{}) error
type RegistryDiskMetric ¶
type RegistryDiskMetric struct {
BaseAnkaMetric
HandleData func(*types.RegistryDisk, prometheus.Gauge)
}
func (RegistryDiskMetric) GetEventHandler ¶
func (rdm RegistryDiskMetric) GetEventHandler() func(interface{}) error
type RegistryTemplateMetric ¶
type RegistryTemplateMetric struct {
BaseAnkaMetric
HandleData func([]types.Template, *prometheus.GaugeVec)
}
TODO: can we make prometheus.GaugeVec support also .Gauge?
func (RegistryTemplateMetric) GetEventHandler ¶
func (rtm RegistryTemplateMetric) GetEventHandler() func(interface{}) error
type RegistryTemplatesMetric ¶
type RegistryTemplatesMetric struct {
BaseAnkaMetric
HandleData func([]types.Template, prometheus.Gauge)
}
TODO: can we make prometheus.GaugeVec support also .Gauge?
func (RegistryTemplatesMetric) GetEventHandler ¶
func (rtm RegistryTemplatesMetric) GetEventHandler() func(interface{}) error
Click to show internal directories.
Click to hide internal directories.