chore: update prometheus input readme to match config options (#9270)
This commit is contained in:
parent
8eec159871
commit
467ab87912
|
|
@ -10,7 +10,7 @@ in Prometheus format.
|
||||||
[[inputs.prometheus]]
|
[[inputs.prometheus]]
|
||||||
## An array of urls to scrape metrics from.
|
## An array of urls to scrape metrics from.
|
||||||
urls = ["http://localhost:9100/metrics"]
|
urls = ["http://localhost:9100/metrics"]
|
||||||
|
|
||||||
## Metric version controls the mapping from Prometheus metrics into
|
## Metric version controls the mapping from Prometheus metrics into
|
||||||
## Telegraf metrics. When using the prometheus_client output, use the same
|
## Telegraf metrics. When using the prometheus_client output, use the same
|
||||||
## value in both plugins to ensure metrics are round-tripped without
|
## value in both plugins to ensure metrics are round-tripped without
|
||||||
|
|
@ -19,30 +19,37 @@ in Prometheus format.
|
||||||
## example: metric_version = 1;
|
## example: metric_version = 1;
|
||||||
## metric_version = 2; recommended version
|
## metric_version = 2; recommended version
|
||||||
# metric_version = 1
|
# metric_version = 1
|
||||||
|
|
||||||
|
## Url tag name (tag containing scrapped url. optional, default is "url")
|
||||||
|
# url_tag = "url"
|
||||||
|
|
||||||
## An array of Kubernetes services to scrape metrics from.
|
## An array of Kubernetes services to scrape metrics from.
|
||||||
# kubernetes_services = ["http://my-service-dns.my-namespace:9100/metrics"]
|
# kubernetes_services = ["http://my-service-dns.my-namespace:9100/metrics"]
|
||||||
|
|
||||||
## Kubernetes config file to create client from.
|
## Kubernetes config file to create client from.
|
||||||
# kube_config = "/path/to/kubernetes.config"
|
# kube_config = "/path/to/kubernetes.config"
|
||||||
|
|
||||||
## Scrape Kubernetes pods for the following prometheus annotations:
|
## Scrape Kubernetes pods for the following prometheus annotations:
|
||||||
## - prometheus.io/scrape: Enable scraping for this pod
|
## - prometheus.io/scrape: Enable scraping for this pod
|
||||||
## - prometheus.io/scheme: If the metrics endpoint is secured then you will need to
|
## - prometheus.io/scheme: If the metrics endpoint is secured then you will need to
|
||||||
## set this to `https` & most likely set the tls config.
|
## set this to 'https' & most likely set the tls config.
|
||||||
## - prometheus.io/path: If the metrics path is not /metrics, define it with this annotation.
|
## - prometheus.io/path: If the metrics path is not /metrics, define it with this annotation.
|
||||||
## - prometheus.io/port: If port is not 9102 use this annotation
|
## - prometheus.io/port: If port is not 9102 use this annotation
|
||||||
# monitor_kubernetes_pods = true
|
# monitor_kubernetes_pods = true
|
||||||
|
|
||||||
## Get the list of pods to scrape with either the scope of
|
## Get the list of pods to scrape with either the scope of
|
||||||
## - cluster: the kubernetes watch api (default), no need to specify
|
## - cluster: the kubernetes watch api (default, no need to specify)
|
||||||
## - node: the local cadvisor api; for scalability. Note that the config node_ip or the environment variable NODE_IP must be set to the host IP.
|
## - node: the local cadvisor api; for scalability. Note that the config node_ip or the environment variable NODE_IP must be set to the host IP.
|
||||||
# pod_scrape_scope = "cluster"
|
# pod_scrape_scope = "cluster"
|
||||||
|
|
||||||
## Only for node scrape scope: node IP of the node that telegraf is running on.
|
## Only for node scrape scope: node IP of the node that telegraf is running on.
|
||||||
## Either this config or the environment variable NODE_IP must be set.
|
## Either this config or the environment variable NODE_IP must be set.
|
||||||
# node_ip = "10.180.1.1"
|
# node_ip = "10.180.1.1"
|
||||||
## Only for node scrape scope: interval in seconds for how often to get updated pod list for scraping
|
|
||||||
|
## Only for node scrape scope: interval in seconds for how often to get updated pod list for scraping.
|
||||||
## Default is 60 seconds.
|
## Default is 60 seconds.
|
||||||
# pod_scrape_interval = 60
|
# pod_scrape_interval = 60
|
||||||
|
|
||||||
## Restricts Kubernetes monitoring to a single namespace
|
## Restricts Kubernetes monitoring to a single namespace
|
||||||
## ex: monitor_kubernetes_pods_namespace = "default"
|
## ex: monitor_kubernetes_pods_namespace = "default"
|
||||||
# monitor_kubernetes_pods_namespace = ""
|
# monitor_kubernetes_pods_namespace = ""
|
||||||
|
|
@ -51,24 +58,25 @@ in Prometheus format.
|
||||||
# field selector to target pods
|
# field selector to target pods
|
||||||
# eg. To scrape pods on a specific node
|
# eg. To scrape pods on a specific node
|
||||||
# kubernetes_field_selector = "spec.nodeName=$HOSTNAME"
|
# kubernetes_field_selector = "spec.nodeName=$HOSTNAME"
|
||||||
|
|
||||||
## Use bearer token for authorization. ('bearer_token' takes priority)
|
## Use bearer token for authorization. ('bearer_token' takes priority)
|
||||||
# bearer_token = "/path/to/bearer/token"
|
# bearer_token = "/path/to/bearer/token"
|
||||||
## OR
|
## OR
|
||||||
# bearer_token_string = "abc_123"
|
# bearer_token_string = "abc_123"
|
||||||
|
|
||||||
## HTTP Basic Authentication username and password. ('bearer_token' and
|
## HTTP Basic Authentication username and password. ('bearer_token' and
|
||||||
## 'bearer_token_string' take priority)
|
## 'bearer_token_string' take priority)
|
||||||
# username = ""
|
# username = ""
|
||||||
# password = ""
|
# password = ""
|
||||||
|
|
||||||
## Specify timeout duration for slower prometheus clients (default is 3s)
|
## Specify timeout duration for slower prometheus clients (default is 3s)
|
||||||
# response_timeout = "3s"
|
# response_timeout = "3s"
|
||||||
|
|
||||||
## Optional TLS Config
|
## Optional TLS Config
|
||||||
# tls_ca = /path/to/cafile
|
# tls_ca = /path/to/cafile
|
||||||
# tls_cert = /path/to/certfile
|
# tls_cert = /path/to/certfile
|
||||||
# tls_key = /path/to/keyfile
|
# tls_key = /path/to/keyfile
|
||||||
|
|
||||||
## Use TLS but skip chain & host verification
|
## Use TLS but skip chain & host verification
|
||||||
# insecure_skip_verify = false
|
# insecure_skip_verify = false
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ var sampleConfig = `
|
||||||
# metric_version = 1
|
# metric_version = 1
|
||||||
|
|
||||||
## Url tag name (tag containing scrapped url. optional, default is "url")
|
## Url tag name (tag containing scrapped url. optional, default is "url")
|
||||||
# url_tag = "scrapeUrl"
|
# url_tag = "url"
|
||||||
|
|
||||||
## An array of Kubernetes services to scrape metrics from.
|
## An array of Kubernetes services to scrape metrics from.
|
||||||
# kubernetes_services = ["http://my-service-dns.my-namespace:9100/metrics"]
|
# kubernetes_services = ["http://my-service-dns.my-namespace:9100/metrics"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue