Skip to content

Instantly share code, notes, and snippets.

@tashian
Last active May 4, 2021 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tashian/4e9ab9c5dcecc70946a9ae2a0e0044c3 to your computer and use it in GitHub Desktop.
Save tashian/4e9ab9c5dcecc70946a9ae2a0e0044c3 to your computer and use it in GitHub Desktop.
Prometheus configuration file with TLS support
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
- job_name: 'nodes'
scheme: https
tls_config:
cert_file: '/etc/prometheus/client.crt'
key_file: '/etc/prometheus/client.key'
ca_file: '/etc/prometheus/root_ca.crt'
file_sd_configs:
- files:
- 'targets/nodes.json'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment