Hello
Just started out testing Prometheus to see if correct for us.
I am trying to add Azure discovery into the config file. I have set up an azure app into our Azure AD to get client ID/secret etc.. However I am obviously making a silly mistake somewhere. As when I try and run I get an error on the config file. The output on run is as follows.
C:\prometheus>prometheus.exe
INFO[0000] Starting prometheus (version=2.0.0-beta.2, branch=HEAD, revision=a52f082939a566d5269671e98be06fc6bdf61d09) source="main.go:204"
INFO[0000] Build context (go=go1.8.3, user=REMOVEDFROMPUBLICPOST, date=20170818-08:25:08) source="main.go:205"
INFO[0000] Host details (windows) source="main.go:206"
INFO[0000] Starting tsdb source="main.go:218"
INFO[0000] tsdb started source="main.go:224"
INFO[0000] Loading configuration file prometheus.yml source="main.go:357"
ERRO[0000] Error loading config: couldn't load configuration (--config.file=prometheus.yml): unknown fields in config: static_configs, azure_sd_configs source="main.go:273"
My Config file is as follows (I removed security keys from public post etc)
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first.rules"
# - "second.rules"
# 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:9182']
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'Azure Production'
azure_sd_configs:
# List of Azure service discovery configurations.
subscription_id: '0REMOVEDFROMPUBLICPOSTc'
tenant_id: '2REMOVEDFROMPUBLICPOST4'
client_id: '4REMOVEDFROMPUBLICPOST1'
client_secret: 'nREMOVEDFROMPUBLICPOST='
Any advice on what I am missing would be really appreciated
From
Russell