Hi Everyone, 

I'm new to this group so please let me know if I break any etiquette. 

I'm wondering if anyone can help with the below issue I am facing. 

I am using docker compose to startup prometheus and the blackbox exporter. 
I am seeing errors from my prometheus and blackbox docker containers that 
indicate I have used an incorrect yml syntax but I'm not clear where I am 
going wrong here. 

If anyone have any idea where I might be going wrong I greatly appreciate 
your input. 

Thank you in advance.

Nick

The errors are as follows:

*From the prometheus container* 
level=error ts=2020-05-01T08:45:35.540Z caller=main.go:747 err="error 
loading config from \"/etc/prometheus/prometheus.yml\": couldn't load 
configuration                                                              
                  (--config.file=\"/etc/prometheus/prometheus.yml\"): 
parsing YAML file /etc/prometheus/prometheus.yml: yaml: unmarshal 
errors:\n  line 39: cannot unmarshal !!str `smtp_st...` into []string"

*From the blackbox container*
blackbox  | level=error ts=2020-05-01T08:45:49.658Z caller=main.go:216 
msg="Error loading config" err="error parsing config file: yaml: line 3: 
mapping values are not allowed in this context"

*My blackbox.yml is:*
modules:
  smtp_starttls:
      prober: tcp
      timeout: 5s
      tcp:
        query_response:
          - expect: "^220 ([^ ]+) ESMTP (.+)$"
          - send: "EHLO prober"
          - expect: "^250-STARTTLS"
          - send: "STARTTLS"
          - expect: "^220"
          - starttls: true
          - send: "EHLO prober"
          - expect: "^250-AUTH"
          - send: "QUIT"


*My prometheus.yml is:* 
global:
  scrape_interval: 30s
  evaluation_interval: 30s

scrape_configs:
  - job_name: blackbox
    metrics_path: /probe
    params:
      module: smtp_starttls
    static_configs:
      - targets:
        - hostname:26
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: blackbox:9115  
# The blackbox exporter's real hostname:port.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/560429b4-73f4-46ce-8c42-864469d34817%40googlegroups.com.

Reply via email to