Skip to content

Trigger severity as Emoji

landergate edited this page Nov 15, 2016 · 4 revisions

This plugin supports usage of chat emojis. You can use this feature to visualize trigger severity right in the message from Zabbix.

How to implement

Prepare your "emoji_map"

You can find it in zbxtg_settings.py.

Format: "Severity name": "some_emoji_symbol"
Make "Severity name" match {TRIGGER.SEVERITY} name from Zabbix (case-sensitive).

Example:

emoji_map = {
    "OK": "✅",
    "Not classified": "❕",
    "Information": "ℹ️",
    "Warning": "⚠️",
    "Average": "❗",
    "High": "❌",
    "Disaster": "🔥"
}

You can use any emoji you want! Just make sure Telegram supports it and renders it as a graphic icon.

Change Zabbix Action

Add {{{TRIGGER.SEVERITY}}} as a prefix to the message's subject, so it would look something like this:

{{{TRIGGER.SEVERITY}}} FAIL: {TRIGGER.NAME} on {HOSTNAME}

Then add {{OK}} to the Recovery subject:

{{OK}} OK: {TRIGGER.NAME} on {HOSTNAME}

How it looks

Let's say you have default severity labels. That's how it would look:

Not classified

Information

Warning

Average

High

Disaster