1. Skipping Certificate Verification Prevents Scraping
If you can skip TLS authentication when scraping metrics, that is the easiest path. The Prometheus ConfigMap configuration looks like this:
| |
But Prometheus Targets reports Get "https://3.3.3.3:2379/metrics": remote error: tls: bad certificate
The error on the targets page looks like this:

2. Verifying the Scrape Request with curl
- Skipping the certificate
| |
I did not find a solution to this error, so I switched directly to the approach that requires TLS.
- Configuring certificates to fetch data with curl
| |
The metrics data is returned successfully.
The node-node1.pem certificate here should contain the domains for all Etcd node IPs. You can inspect the certificate information with openssl x509 -noout -text -in /etc/ssl/etcd/ssl/node-node1.pem.
3. Adding an Etcd TLS Scrape to the Cluster Prometheus
- Creating the credential
| |
The certificates here are the ones already verified with curl above.
- Mounting the certificates in the Deployment
| |
Add the following two sections:
| |
| |
- Adding the job that scrapes Etcd metrics in the ConfigMap
| |
| |
- Checking the targets status
At this point, in Prometheus you should see the job scraping Etcd monitoring data in the Up state, as shown below:

4. Importing a Grafana Dashboard to View the Monitoring Data
Import dashboard 3070 in Grafana, that is https://grafana.com/grafana/dashboards/3070-etcd/ , and you will see the following monitoring views:

