Search code examples
prometheus-alertmanager

Minimal viable alertmanager configuration without paging


I'm trying to get alertmanager running without paging. All I want to do is see the alerts on the alertmanager web page but I can't find a config which doesn't want to send pages somewhere.

If I exclude the config file I get an error.

component=configuration msg="Loading configuration file failed" file=alertmanager.yml err="open alertmanager.yml: no such file or directory"

I have commented out that file and the associated command but obviously it's mandatory. Can somebody point me to a config which works but doesn't want to send alert notifications anywhere?


Solution

  • I think super-minimal should be something like:

    global:
      resolve_timeout: 5m
    route:
      receiver: "null"
      group_by:
      - job
      group_wait: 30s
      group_interval: 5m
      repeat_interval: 12h
    receivers:
    - name: "null"
    

    Less minimal:

    global:
      resolve_timeout: 5m
    route:
      receiver: main
      group_by:
      - job
      routes:
      - receiver: "null"
        match:
          alertname: Watchdog
      group_wait: 30s
      group_interval: 5m
      repeat_interval: 12h
    receivers:
    - name: "null"
    - name: main
    # Here define the receiver
    # Add templates if necessary
    #templates:
    #- /etc/alertmanager/*.tmpl