Pushover notification template

Hi everyone,

I’m testing with checkmk 2.2.0p23.cre at the moment because I want to migrate from PRTG.

I got pushover notifications running fine but the include to much information (like ping rta or lost).
On the other hand I miss the hostname in the first line of the message and so on …

Is there a way to modify the pushover template like it is possible for HTML Emails?

Thanks a lot,

I guess what you get is quite fixed. You might want to check out SIGNL4 alerting with similar functionality in the free plan.

Thanks for the reply but not a real solution sorry.
I use pushover for many services and want to keep that.

You can only modify the content of your push message if you change the “~/lib/check_mk/notification_plugins/pushover.py” file.
There are two ways to change this plugins.
1 - Copy the mentioned file to “~/local/lib/check_mk/notification_plugins/pushover.py” and change the content like you want.
You only need to remember that this change is used for all pushover messages now.
2 - Copy the mentioned file to “~/local/share/check_mk/notifications/pushover2”, make it executeable and insert as line 2 # Push Notifications 2 (using Pushover)
Then you can change the content as you like.
The name you inserted in line 2 is than shown inside the GUI as name for the notification.
Now you have two different pushover notifications.

3 Likes

That sounds really good!!

I tried idea 2 and in general it works but unfortunately I’m not able to configure Pushover API configurations. There are no parameters configurable. But I’ll try idea 1 tonight.

Thanks a lot,

OK, solution 1 also did not work but editing ~/lib/check_mk/notification_plugins/pushover.py worked fine

And just as an idea what I changed (in the first step):

    s = context["HOSTNAME"]
    -->
    #s = context["HOSTNAME"]
    if context["NOTIFICATIONTYPE"] == "PROBLEM":
      s = "\u26D4 " + context["HOSTNAME"]
    elif context["NOTIFICATIONTYPE"] == "RECOVERY":
      s = "\u2705 " + context["HOSTNAME"]
    else:
      s = context["HOSTNAME"]

This results in a red “no entry” character for problems at the beginning of a pushover message or a green checkmark for recovery messages.

Much easier to identify if it is a problem or recovery (or anything else).

1 Like