Documentation ¶
Index ¶
- type EtcdHealthMonitor
- func (srv *EtcdHealthMonitor) Collect(metrics chan<- prometheus.Metric)
- func (srv *EtcdHealthMonitor) Describe(desc chan<- *prometheus.Desc)
- func (srv *EtcdHealthMonitor) IsWithinHardHealthLimit() bool
- func (srv *EtcdHealthMonitor) IsWithinSoftHealthLimit() bool
- func (srv *EtcdHealthMonitor) Run(ctx context.Context)
- type EtcdLimitHealthMonitor
- type FakeEtcdLimitHealthMonitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdHealthMonitor ¶
type EtcdHealthMonitor struct { // Time after which we consider instances to be down if no metrics have been collected successfully. // Defaults to 2 minutes. MetricsMaxAge time.Duration // Interval at which to scrape metrics from etcd. // Defaults to 5 second. ScrapeInterval time.Duration // contains filtered or unexported fields }
EtcdHealthMonitor is a service for monitoring the health of etcd. It continually scrapes metrics from one of more etcd instances and provides a method for checking the fraction of storage in use.
func NewEtcdHealthMonitor ¶
func NewEtcdHealthMonitor(etcConfiguration configuration.EtcdConfiguration, client *http.Client) (*EtcdHealthMonitor, error)
Return a new EtcdHealthMonitor that monitors the etcd instances at the given urls. Provide a http client, e.g., to use auth, or set client to nil to use the default client.
func (*EtcdHealthMonitor) Collect ¶
func (srv *EtcdHealthMonitor) Collect(metrics chan<- prometheus.Metric)
func (*EtcdHealthMonitor) Describe ¶
func (srv *EtcdHealthMonitor) Describe(desc chan<- *prometheus.Desc)
func (*EtcdHealthMonitor) IsWithinHardHealthLimit ¶
func (srv *EtcdHealthMonitor) IsWithinHardHealthLimit() bool
func (*EtcdHealthMonitor) IsWithinSoftHealthLimit ¶
func (srv *EtcdHealthMonitor) IsWithinSoftHealthLimit() bool
func (*EtcdHealthMonitor) Run ¶
func (srv *EtcdHealthMonitor) Run(ctx context.Context)
Run the service until ctx is cancelled.
type EtcdLimitHealthMonitor ¶
type FakeEtcdLimitHealthMonitor ¶
func (*FakeEtcdLimitHealthMonitor) IsWithinHardHealthLimit ¶
func (f *FakeEtcdLimitHealthMonitor) IsWithinHardHealthLimit() bool
func (*FakeEtcdLimitHealthMonitor) IsWithinSoftHealthLimit ¶
func (f *FakeEtcdLimitHealthMonitor) IsWithinSoftHealthLimit() bool
Click to show internal directories.
Click to hide internal directories.