objectrocket/opsy

alert mapping

derekmoyes opened this issue · 2 comments

If the goal is to include plugins from other alerting systems, you may need an alert mapping function.

Something like:

[zone1]
backend = hourglass.backends.zenoss.cache:ZenossZone
/* Zenoss severity levels 5 = Critical/High, 3 = Medium, 2 = Low, 0 = Info
... mapped to exit codes (not using unknown #3) */
alert_mapping = 5:2, 4:1, 3:1, 2:1, 1:0, 0:0
host = [hostname]
port = [port]
timeout = 10

Instead, we are going to come up with a generic way of storing an alerts level. Likely something like OK, Info, Warning, Critical, Other.

It will be the responsibility of the backend to convert whatever alert levels are provided by the monitoring system into one of the levels that Hourglass uses.

The other option is to have the backend store a pair of information of what it wants the alert labeled as, along with what level Hourglass should treat it as (for color highlighting on the web panel).

Either way, I don't think this needs to be configured in the ini file, instead this translation should happen seamlessly inside the backend plugin.

Thoughts?

That makes sense.