Skip to content

Provides the ability to customize alert messages to be more OpsGenie friendly, such as enabling alias customization

Notifications You must be signed in to change notification settings

pawadski/alertmanager-opsgenie-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

alertmanager-opsgenie-proxy

Provides the ability to customize alert messages to be more OpsGenie friendly, such as enabling alias customization

Made to partially work around prometheus/alertmanager#1598

install & dependencies

You will need:

install instructions

  1. git clone https://github.com/pawadski/alertmanager-opsgenie-proxy.git
  2. cd alertmanager-opsgenie-proxy
  3. python3.5 proxy.py

configure Alertmanager

You will need to point Alertmanager at the proxy instead of OpsGenie API:

receivers:
- name: opsgenie
  opsgenie_configs:
  - api_key: "put_api_key_here"
    api_url: "http://127.0.0.1:9095"
    send_resolved: true

configure alerts

tl;dr - all annotation fields that begin with "opsgenie_" are converted to actually be sent to opsgenie, so an annotation opsgenie_alias is sent to OpsGenie as alias

Example:

groups:
- name: monitoring
  interval: 5s
  rules:
  - alert: IOWait5minAvgOver35
    expr: monitoring_stat_cpu_current_iowait_percent >= 0
    labels:
      service: monitoring
      severity: critical
    annotations:
      opsgenie_description: '{{ $labels.instance }}: 5 minute average CPU IOWait is >35'
      opsgenie_alias: 'hello_this_is_an_alias'

In the above example, opsgenie_description and opsgenie_alias get passed to OpsGenie as themselves without the "opsgenie_" part.

bugs

I don't know. Literally just made it.

docker

https://cloud.docker.com/repository/docker/pawadski/alertmanager-opsgenie-proxy

feature requests

Let me know if you need a systemd service file or something

About

Provides the ability to customize alert messages to be more OpsGenie friendly, such as enabling alias customization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages