Prometheus alertmanager

From wikinotes
Revision as of 03:41, 18 February 2022 by Will (talk | contribs) (→‎Documentation)

Alertmanager is the official service prometheus communicates with to issue alerts.

Documentation

repo https://github.com/prometheus/alertmanager
official docs https://prometheus.io/docs/alerting/latest/configuration/
sample config https://github.com/prometheus/alertmanager#example

Locations

9093 default port that receives alerts

Install

pkg install alertmanager  # FreeBSD
pacman -S alertmanager    # Archlinux

You'll also need to enable/start the service.

Configuration

AlertManager

Prometheus

# /usr/local/etc/prometheus.yml

alerting:
  alertmanagers:
    - static_configs:
      - targets: ['localhost:9093']

Usage

amtool check-config alertmanager.yml  # validate an alertmanager config