diff --git a/docs/sources/reference/components/prometheus.scrape.md b/docs/sources/reference/components/prometheus.scrape.md index 00b373e30b..9fd950ca44 100644 --- a/docs/sources/reference/components/prometheus.scrape.md +++ b/docs/sources/reference/components/prometheus.scrape.md @@ -259,6 +259,8 @@ present. ## Example +### Set up scrape jobs for `blackbox exporter` targets + The following example sets up the scrape job with certain attributes (scrape endpoint, scrape interval, query parameters) and lets it scrape two instances of the [blackbox exporter](https://github.com/prometheus/blackbox_exporter/). @@ -286,6 +288,22 @@ http://blackbox-exporter:9115/probe?target=grafana.com&module=http_2xx http://blackbox-exporter:9116/probe?target=grafana.com&module=http_2xx ``` +### Authentication with the Kubernetes API server + +The following example shows you how to authenticate with the Kubernetes API server. + +```alloy +prometheus.scrape "kubelet" { + scheme = "https" + tls_config { + server_name = "kubernetes" + ca_file = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" + insecure_skip_verify = false + } + bearer_token_file = "/var/run/secrets/kubernetes.io/serviceaccount/token" +} +``` + ### Technical details `prometheus.scrape` supports [gzip](https://en.wikipedia.org/wiki/Gzip) compression.