Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 977 Bytes

README.md

File metadata and controls

41 lines (32 loc) · 977 Bytes

alertlogger

Provides a webhook for prometheus alertmanager and simple logs to stderr.

Either json output or key/value output is supported.

Install:

> kubectl apply -f https://github.com/raw/mwennrich/alertlogger/main/samples/alertloggerStatefulSet.yaml
> kubectl apply -f https://github.com/raw/mwennrich/alertlogger/main/samples/alertloggerService.yaml

Add to alertmanager config:

(...)
      routes:
        - match_re:
            severity: 'critical'
          receiver: 'alertlogger'
          continue: true
        - match_re:
            severity: 'warning'
          receiver: 'alertlogger'
          continue: true
(...)
    receivers:
    - name: 'null'
    - name: 'alertlogger'
      webhook_configs:
        - url: http://alertlogger:5001

Watch logs:

> kubectl logs -n monitoring alertlogger-0 -f

alerts can now be ingested to your preferred log-shipper solution like fluentd or promtail/loki.