Documentation ¶
Index ¶
- Constants
- func CheckExecutables(paths ...string) error
- type DefaultCollector
- func (c *DefaultCollector) Describe(ch chan<- *prometheus.Desc)
- func (c *DefaultCollector) GetDescriptor(name string) *prometheus.Desc
- func (c *DefaultCollector) GetSubsystem() string
- func (c *DefaultCollector) MakeCounterMetric(name string, value float64, labelValues ...string) prometheus.Metric
- func (c *DefaultCollector) MakeGaugeMetric(name string, value float64, labelValues ...string) prometheus.Metric
- func (c *DefaultCollector) SetDescriptor(name, help string, variableLabels []string)
- type InstrumentableCollector
- type InstrumentedCollector
- type SubsystemCollector
Constants ¶
View Source
const NAMESPACE = "ha_cluster"
Variables ¶
This section is empty.
Functions ¶
func CheckExecutables ¶
check that all the given paths exist and are executable files
Types ¶
type DefaultCollector ¶
type DefaultCollector struct { Clock clock.Clock Logger log.Logger // contains filtered or unexported fields }
func NewDefaultCollector ¶
func NewDefaultCollector(subsystem string, timestamps bool, logger log.Logger) DefaultCollector
func (*DefaultCollector) Describe ¶
func (c *DefaultCollector) Describe(ch chan<- *prometheus.Desc)
func (*DefaultCollector) GetDescriptor ¶
func (c *DefaultCollector) GetDescriptor(name string) *prometheus.Desc
func (*DefaultCollector) GetSubsystem ¶
func (c *DefaultCollector) GetSubsystem() string
func (*DefaultCollector) MakeCounterMetric ¶
func (c *DefaultCollector) MakeCounterMetric(name string, value float64, labelValues ...string) prometheus.Metric
func (*DefaultCollector) MakeGaugeMetric ¶
func (c *DefaultCollector) MakeGaugeMetric(name string, value float64, labelValues ...string) prometheus.Metric
func (*DefaultCollector) SetDescriptor ¶
func (c *DefaultCollector) SetDescriptor(name, help string, variableLabels []string)
Convenience wrapper around prometheus.NewDesc constructor. Stores a metric descriptor with a fully qualified name like `NAMESPACE_subsystem_name`. `name` is the last and most relevant part of the metrics Full Qualified Name; `help` is the message displayed in the HELP line `variableLabels` is a list of labels to declare. Use `nil` to declare no labels.
type InstrumentableCollector ¶
type InstrumentableCollector interface { prometheus.Collector SubsystemCollector CollectWithError(ch chan<- prometheus.Metric) error }
describes a collector that can return errors from collection cycles, instead of the default Prometheus one, which has void Collect returns
type InstrumentedCollector ¶
func NewInstrumentedCollector ¶
func NewInstrumentedCollector(collector InstrumentableCollector, logger log.Logger) *InstrumentedCollector
func (*InstrumentedCollector) Collect ¶
func (ic *InstrumentedCollector) Collect(ch chan<- prometheus.Metric)
func (*InstrumentedCollector) Describe ¶
func (ic *InstrumentedCollector) Describe(ch chan<- *prometheus.Desc)
func (*InstrumentedCollector) GetSubsystem ¶
func (ic *InstrumentedCollector) GetSubsystem() string
type SubsystemCollector ¶
type SubsystemCollector interface {
GetSubsystem() string
}
Click to show internal directories.
Click to hide internal directories.