Unable to start Prometheus (prometheus-2.23.0.windows) in case if we use WMI target-id not find expected key"

1,767 views
Skip to first unread message

Suparna Shankar

unread,
Dec 15, 2020, 10:17:56 AM12/15/20
to Prometheus Developers
Unable to start Prometheus in case if we use WMI target- ERROR throws " level=error ts=2020-12-15T09:13:35.251Z caller=main.go:289 msg="Error loading config (--config.file=prometheus.yml)" err="parsing YAML file prometheus.yml: yaml: line 30: did not find expected key"  

# 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). # Alertmanager configuration alerting: alertmanagers: - static_configs: - targets: # - alertmanager:9093 # Load rules once and periodically evaluate them according to the global 'evaluation_interval'. rule_files: # - "first_rules.yml" # - "second_rules.yml" # 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: 'wmi_exporter' # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ['localhost:9182']  

Suparna Shankar

unread,
Dec 15, 2020, 10:18:43 AM12/15/20
to Prometheus Developers
Can any one advise how to fix it

L.walid (PowerM)

unread,
Dec 15, 2020, 11:30:53 AM12/15/20
to Suparna Shankar, Prometheus Developers
Hi,

This is clearly a syntax error, can you tell us line 30 correspond to what line in your yaml config file ?

Best regards, 
--------------------------------------------------------------
Walid Largou
Solution Architect / Service Delivery Manager
Mobile : +212 621 31 98 71
Email : l.w...@powerm.ma
320 Bd Zertouni 6th Floor, Casablanca, Morocco
--------------------------------------------------------------
https://www.powerm.ma
Power Maroc #1 IBM Business Partner – Power Maroc
This message is confidential .Its contents do not constitute a commitment by Power Maroc S.A.R.L except where provided for in a written agreement between you and Power Maroc S.A.R.L. Any authorized disclosure, use or dissemination, either whole or partial, is prohibited. If you are not the intended recipient of the message, please notify the sender immediately.

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/cb8e0324-62ed-4dc2-838b-51fb0d3b26b5n%40googlegroups.com.

Suparna Shankar

unread,
Dec 15, 2020, 11:32:14 AM12/15/20
to L.walid (PowerM), Prometheus Developers
Hi ,
30 th line was 

 - job_name: 'wmi_exporter' # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ['localhost:9182'] 
--
Regards,

Suparna Shankar
Email: supar...@gmail.com
Cell : +91-9789090614
Office ID : ssup...@temenos.com

L.walid (PowerM)

unread,
Dec 15, 2020, 11:38:34 AM12/15/20
to Suparna Shankar, Prometheus Developers

Best regards, 
--------------------------------------------------------------
Walid Largou
Solution Architect / Service Delivery Manager
Mobile : +212 621 31 98 71
Email : l.w...@powerm.ma
320 Bd Zertouni 6th Floor, Casablanca, Morocco
--------------------------------------------------------------
https://www.powerm.ma
Power Maroc #1 IBM Business Partner – Power Maroc
This message is confidential .Its contents do not constitute a commitment by Power Maroc S.A.R.L except where provided for in a written agreement between you and Power Maroc S.A.R.L. Any authorized disclosure, use or dissemination, either whole or partial, is prohibited. If you are not the intended recipient of the message, please notify the sender immediately.

On 15 Dec 2020, at 17:32, Suparna Shankar <supar...@gmail.com> wrote:

wmi_exporter'

L.walid (PowerM)

unread,
Dec 15, 2020, 11:40:56 AM12/15/20
to Suparna Shankar, Prometheus Developers
Sample Config file :

# my global config
global:
  scrape_interval:     10s
  evaluation_interval: 10s

scrape_configs:
- job_name: 'prometheus'
  static_configs:
  - targets: ['prometheus_dns_name:9090']

- job_name: 'wmi_exporter'
  static_configs:
  - targets: ['windows_dns_name:9182']
Can you also confirm that the metrics are available at port 9182.

Good Luck


Best regards, 
--------------------------------------------------------------
Walid Largou
Solution Architect / Service Delivery Manager
Mobile : +212 621 31 98 71
Email : l.w...@powerm.ma
320 Bd Zertouni 6th Floor, Casablanca, Morocco
--------------------------------------------------------------
https://www.powerm.ma
Power Maroc #1 IBM Business Partner – Power Maroc
This message is confidential .Its contents do not constitute a commitment by Power Maroc S.A.R.L except where provided for in a written agreement between you and Power Maroc S.A.R.L. Any authorized disclosure, use or dissemination, either whole or partial, is prohibited. If you are not the intended recipient of the message, please notify the sender immediately.

Suparna Shankar

unread,
Dec 15, 2020, 12:18:07 PM12/15/20
to L.walid (PowerM), Prometheus Developers
Yes i will we are receiving metrics @9182
Reply all
Reply to author
Forward
0 new messages