prometheus

package
v4.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrometheusCollector

type PrometheusCollector struct {
	*collector.BaseCollector
}

func NewPrometheusCollector

func NewPrometheusCollector() *PrometheusCollector

type PrometheusRule

type PrometheusRule struct {
	URLs []string `` /* 137-byte string literal not displayed */
	// URLTag string   `label:"URL Tag" json:"url_tag" description:"Url tag name (tag containing scrapped url. optional, default is \"url\")" example:"scrapeUrl"`
	// KubernetesServices      []string `label:"Kube Services" json:"kubernetes_services" description:"An array of Kubernetes services to scrape metrics from" example:"http://my-service-dns.my-namespace:9100/metrics"`
	// KubeConfigContent       string   `label:"Kube Conf" json:"kube_config_content" format:"file" description:"Kubernetes config file contenct to create client from"`
	// MonitorPods             bool     `label:"Monitor Pods" json:"monitor_kubernetes_pods" description:"Scrape Kubernetes pods for the following prometheus annotations:<br />- prometheus.io/scrape: Enable scraping for this pod<br />- prometheus.io/scheme: If the metrics endpoint is secured then you will need to<br />    set this to 'https' & most likely set the tls config.<br />- prometheus.io/path: If the metrics path is not /metrics, define it with this annotation.<br />- prometheus.io/port: If port is not 9102 use this annotation"`
	// PodNamespace            string   `label:"Pod Namespace" json:"monitor_kubernetes_pods_namespace" description:"Restricts Kubernetes monitoring to a single namespace" example:"default"`
	// KubernetesLabelSelector string   `label:"Kube Label Selector" json:"kubernetes_label_selector" description:"label selector to target pods which have the label" example:"env=dev,app=nginx"`
	// KubernetesFieldSelector string   `label:"Kube Field Selector" json:"kubernetes_field_selector" description:"field selector to target pods<br />eg. To scrape pods on a specific node" example:"spec.nodeName=$HOSTNAME"`
	// BearerTokenString       string   `label:"Bearer Token" json:"bearer_token_string" format:"file" description:"Use bearer token for authorization. ('bearer_token' takes priority)"`
	// Username                string   `label:"Username" json:"username" description:"HTTP Basic Authentication username"`
	// Password                string   `label:"Password" json:"password" format:"password" description:"HTTP Basic Authentication password"`
	ResponseTimeout int `label:"RESP Timeout" json:"response_timeout" default:"3" description:"Specify timeout duration for slower prometheus clients"`
	plugins.ClientConfig
}

func (*PrometheusRule) TelegrafInput

func (p *PrometheusRule) TelegrafInput() (telegraf.Input, error)

func (*PrometheusRule) Validate

func (p *PrometheusRule) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL