Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Discovery ¶ added in v1.6.0
type Discovery struct {
// contains filtered or unexported fields
}
Discovery provides service discovery functionality based on files that contain target groups in JSON or YAML format. Refreshing happens using file watches and periodic refreshes.
func NewDiscovery ¶
NewDiscovery returns a new file discovery for the given paths.
type SDConfig ¶ added in v1.25.3
type SDConfig struct { Files []string `yaml:"files"` RefreshInterval model.Duration `yaml:"refresh_interval,omitempty"` }
SDConfig is the configuration for file based discovery.
func (*SDConfig) UnmarshalYAML ¶ added in v1.25.3
UnmarshalYAML implements the yaml.Unmarshaler interface.
type TimestampCollector ¶ added in v1.25.3
type TimestampCollector struct { Description *prometheus.Desc // contains filtered or unexported fields }
TimestampCollector is a Custom Collector for Timestamps of the files.
func NewTimestampCollector ¶ added in v1.25.3
func NewTimestampCollector() *TimestampCollector
NewTimestampCollector creates a TimestampCollector.
func (*TimestampCollector) Collect ¶ added in v1.25.3
func (t *TimestampCollector) Collect(ch chan<- prometheus.Metric)
Collect creates constant metrics for each file with last modified time of the file.
func (*TimestampCollector) Describe ¶ added in v1.25.3
func (t *TimestampCollector) Describe(ch chan<- *prometheus.Desc)
Describe method sends the description to the channel.
Click to show internal directories.
Click to hide internal directories.