Notification Script for ntfy.sh

Hey,
I just wanted to exchange my custom notification script for the service ntfy.sh (open source push notification server):

I hope you all like it and maybe can use it :wink:

8 Likes

Thanks for that notification plugin.

Just a quick remark regarding the installation: Customized code has to be put in the local hierarchy of the site. Notification plugins belong to $OMD_ROOT/local/share/check_mk/notifications. This way they survive a Checkmk update.

With the notification plugin in the local hierarchy you can then build an MKP and publish it on the Checkmk exchange.

3 Likes

Thank you for this hint.
I will take a look after it and will make some adjustments in the README.md

1 Like

Hi,
Thanks for the plugin! Took me some time but I got it working on our multi site installation.
What I had wrong: The script musst be copied to the remote site server as well!

Now, I have one more issue: the Link in the notification uses the site name of the remote site. I need this to be the name of the central site. Maybe you can add one more parameter or append the site name only it the URL doesn’t contain one (check for pattern ‘monitoring.example.com/site’) ?

Thanks in advance! :slight_smile:

I will look after it, but it could take a little while.

Update: You could just add more rules for this check and assign to a user on one of the multi sites. It is in number the third parameter wich had to be set.

I’ve changed the description now, thanks again for this hint.
Regarding the MKP I will look after it the next days.

Hi,

just to make sure:
Do you have a multisite were the configurations are pushed or is your config just to show the monitoring results?

If it will be pushed you should be fine in placing the script on the main server as every other server reports its states to the master.

Hi Sascha,
Thank you for sharing, I am still new to cmk, I try to follow your instructions and configure notfications. But it seems that it is not working properly and there is no successful trigger email, if you can guide me to the problem would be very grateful,

Some detail of my steps.

  1. copy the script to the folder and set it executable.
$OMD_ROOT/local/share/check_mk/notifications
`
2.Install ntfy server on Ubuntu 20.04. Enable Https. and add a admin user and set the user password.
I have test I can use the user and password to log the https://my-ntfy server successfully.
![image|690x352](upload://mp3ZpMQMp6BSUAliFy4gfA2NxzF.png)

3. 
![image|690x86](upload://vqIon2CtvDt3SWKSEV4zPT9ExQN.png)
For this part , 
NOTIFY_PARAMETER_1: myntfy server hostname
NOTIFY_PARAMETER_2:channel labopsCMK
NOTIFY_PARAMETER_3:http://mycheckmkserver/Site/
NOTIFY_PARAMETER_4:user
NOTIFY_PARAMETER_5:password

Thank you in advance,
BR,
Minghui.

I’ve just read your post.
This script will not send an email, but you need a ntfy.sh server at hand which can handle the notifications sent to it.

hello, as i got wrecked with Checkmk Exchange and needed to uninstall that due to incompatibility with checkmk 2.4.0 i’d like to kindly ask if this ntfy alternative solution works with 2.4 and still gets maintenance (as notofy-via-ntfy seems to be unmaintained and there is no way to report to the author)

I’m planning on upgrade our Checkmk instance to 2.4 this week and will then check if the script still works.
Although this script you posted did not come from me.

1 Like

thanks.
i did already test it as it was easy to install/configure.

i only found some minor glitch and reported at unparsed/unprocessed strings/vars in output · Issue #4 · ADMIN-INTELLIGENCE-GmbH/CheckMK · GitHub

Although this script you posted did not come from me.

sure - but i did never tell that.

Thanks for the issue on Github.
I’m already working on it.

I needed to relink the script into a subfolder.
The new link is: CheckMK/notifications/ntfy.sh at main · ADMIN-INTELLIGENCE-GmbH/CheckMK · GitHub

Maybe a moderator could change the link in the first post.

Done. :slight_smile:

Thanks a lot.

Best regards,
Sascha