Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface {
Describe(ch chan<- *prometheus.Desc)
Collect(ch chan<- prometheus.Metric)
Add(metrics []telegraf.Metric) error
}
type PrometheusClient ¶
type PrometheusClient struct {
Listen string `toml:"listen"`
ReadTimeout config.Duration `toml:"read_timeout"`
WriteTimeout config.Duration `toml:"write_timeout"`
MetricVersion int `toml:"metric_version"`
BasicUsername string `toml:"basic_username"`
BasicPassword config.Secret `toml:"basic_password"`
IPRange []string `toml:"ip_range"`
ExpirationInterval config.Duration `toml:"expiration_interval"`
Path string `toml:"path"`
CollectorsExclude []string `toml:"collectors_exclude"`
StringAsLabel bool `toml:"string_as_label"`
ExportTimestamp bool `toml:"export_timestamp"`
TypeMappings serializers_prometheus.MetricTypes `toml:"metric_types"`
HTTPHeaders map[string]*config.Secret `toml:"http_headers"`
Log telegraf.Logger `toml:"-"`
common_tls.ServerConfig
// contains filtered or unexported fields
}
func (*PrometheusClient) Close ¶
func (p *PrometheusClient) Close() error
func (*PrometheusClient) Connect ¶
func (p *PrometheusClient) Connect() error
func (*PrometheusClient) Init ¶
func (p *PrometheusClient) Init() error
func (*PrometheusClient) SampleConfig ¶
func (*PrometheusClient) SampleConfig() string
func (*PrometheusClient) URL ¶
func (p *PrometheusClient) URL() string
URL returns the address the plugin is listening on. If not listening an empty string is returned.
Click to show internal directories.
Click to hide internal directories.