Configuring Prometheus Scraper Sources
Using the Prometheus Edge Scraper, you can discover and collect metrics in Kubernetes Clusters dynamically. There are two Kubernetes-specific modes of operation:
- Node: When configured to scrape Nodes, each Cribl Edge Node (Pod) will scrape from the configured port on every deployed Node in the DaemonSet.
- Pods: When configured for Pod scraping, a single Edge Node will be elected to scrape the metrics from the discovered endpoints.
In this Sandbox, you'll configure the Prometheus Edge Scraper to collect metrics from the Kubelet in your virtual Kubernetes cluster.
important
- If not already there, navigate to the Collect tab in the secondary navigation menu.
- Click the Add Source button on the left-hand Sources column.
- Type Prometheus in the Filter Sources textbox, or scroll to find the Prometheus Edge Scraper Source tile.
- Hover over the tile and click the Add New button.
- In the Input ID, enter:
kubelet_metrics
. - From the Discovery Type dropdown, select Kubernetes Node.
- Change the Protocol to https.
- Enter
10250
in the Port textbox. This is the standard kubelet API port. - Click the Authentication tab on the left menu.
- Select Kubernetes for the Authentication method type.
- Click the Fields tab on the left menu.
- Click Add Field.
- Add a new field.
Name | Value |
---|---|
job | 'kubelet' |
- Click Save .
Now, you'll configure the Prometheus Edge Scraper to collect metrics from the cadvisor
endpoint.
important
- Click the Add Source button on the left-hand Sources column.
- Type Prometheus in the Filter Sources textbox, or scroll to find the Prometheus Edge Scraper Source tile.
- Hover over the tile and click the Add New button.
- In the Input ID, enter:
cadvisor_metrics
. - From the Discovery Type dropdown, select Kubernetes Node.
- Change the Protocol to
https
. - Enter
10250
in the Port textbox. This is the standard kubelet API port. - Modify the Path to
/metrics/cadvisor
- Click the Authentication tab on the left menu.
- Select Kubernetes for the Authentication method type.
- Click the Fields tab on the left menu.
- Click the Add Field.
- Add a new field.
Name | Value |
---|---|
job | 'cadvisor' |
- Click Save.
tip
If you have deployed the Prometheus Node Exporter in your Kubernetes cluster, you can add another Prometheus Edge Scraper Source to collect those metrics.
This Sandbox does not have a Node Exporter deployed.
Next, we'll configure the Pipeline to connect all the metrics sources to Prometheus.