Last active
September 26, 2024 05:24
-
-
Save tashian/4e9ab9c5dcecc70946a9ae2a0e0044c3 to your computer and use it in GitHub Desktop.
Prometheus configuration file with TLS support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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
Hi I have already TLS enabled with the help of your above code , now i need to renew a signed certificate . Can you let me know the steps and configuration for the Cert renewal .