Docker - Prometheus container dies immediately
Config format is changed. targets come under static_config in the latest version.
scrape_configs:# Scrape Prometheus itself every 2 seconds. - job_name: 'prometheus' scrape_interval: 2s static_configs: - targets: ['localhost:9090', 'cadvisor:8080']
Yes, target_groups
is renamed to static_configs
. Please use the latest Prometheus image with the following.
static_configs: - targets: ['localhost:9090', 'cadvisor:8080']
The above worked for me.
I think target_groups
have been deprecated from scrape_configs
in latest version of prometheus.you can try static_configs or file_sd_config
scrape_config
static_config
file_sd_config
scrape_configs: - job_name: node_exporter static_configs: - targets: - "stg-elk-app-01:9100" - "stg-app-02:9100"