Hello people.
this is my blackbox configuration it has two files (lists of sites). below 
my configuration of alerts using slack.


my question is, how can i use different receiver for each list in the 
blackbox. ex: sites01.yml use slack
sites02.yml use email.


####config blackbox  
- job_name: 'blackbox'
    scrape_interval: 30s
    scrape_timeout: 20s
    metrics_path: /probe
    params:
      module: [http_2xx]  # Look for a HTTP 200 response.
    file_sd_configs:
      - files:
        - /etc/prometheus/sites01.yml
        - /etc/prometheus/sites02.yml
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: "blackbox_exporter:9115"  # Blackbox exporter.

###config alertmanager
receivers:
  - name: 'slack'
    slack_configs:
    - api_url: 'https://hooks.slack.com/services/...'
      send_resolved: true
      username: 'jcm'
      channel: '#alert'
      title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ 
.Alerts.Firing | len }}{{ end }}] Notificações de Status - {{if eq .Status 
"firing"}}Site(s) OffLine!{{else}}Sites Sucessfull!{{end}} {{if eq .Status 
"firing"}}:fire:{{else}}:raised_hands:{{end}}'
      text: "{{ range .Alerts }}*Description:* 
{{.Annotations.description}}\n{{end}}

-- 
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/b57e3901-de06-4ceb-8ad2-b26df13da47bn%40googlegroups.com.

Reply via email to