A nice and little collection of alerts scripts to be used with the Zabbix network monitoring solution.
At the moment the available scripts are:
- notify_pushbullet.py - Send notifications using Pushbullet
- notify_pushover.py - Send notifications using Pushover
Zabbix alert script to send notifications using Pushbullet
pip install pushbullet.py
usage: notify_pushbullet.py [-h] "AccessToken(|DeviceName)" "Subject" "Message"
Send Zabbix notification to Pushbullet enabled devices.
positional arguments:
AccessToken(|DeviceName)
Pushbullet Access Token that and optional DeviceName
if targetting a specific device.
Subject Subject you want to push to the device(s).
Message Message you want to push to the device(s).
optional arguments:
-h, --help show this help message and exit
You first need to register for an account at Pushbullet and download/install the clients for your devices (Android/iOS/Windows...). You will then able to retrieve your AccessToken that you will need to provide in your zabbix user media configuration.
Copy the notify_pushbullet.py script to your Zabbix alert scripts directory. Usually this is /usr/lib/zabbix/alertscripts but configuration can differs depending on how you installed Zabbix. In doubt, check your zabbix_server.conf.
Go to your Zabbix Administration / Media types screen and add a new media. Specify the name of the script in script name and check that the parameters are correct.
You will need then to add the media to your users. For this just edit an user and add a media selecting the one you just created before. Specify the Access Token in the Send to field.
If you have multiple devices on your Pushbullet account and want to target only one device, you can specify the device name in the Send to field separated from Access Token with a | .
And voila, you're ready to use Pushbullet notifications!
Zabbix alert script to send notifications using Pushover
pip install python-pushover
usage: notify_pushover.py [-h] "UserKey|AppToken" "Subject" "Message"
Send Zabbix notification to Pushover enabled devices.
positional arguments:
UserKey|AppToken Pushover User Key AND Application Token separated by |
Subject Subject you want to push to the device(s).
Message Message you want to push to the device(s).
optional arguments:
-h, --help show this help message and exit
You first need to register for an account at Pushover and download/install the clients for your devices (Android/iOS/Windows...). You will then able to retrieve your UserKey and AppToken that you will need to provide in your zabbix user media configuration.
Copy the notify_pushover.py script to your Zabbix alert scripts directory. Usually this is /usr/lib/zabbix/alertscripts but configuration can differs depending on how you installed Zabbix. In doubt, check your zabbix_server.conf.
Go to your Zabbix Administration / Media types screen and add a new media. Specify the name of the script in script name and check that the parameters are correct.
You will need then to add the media to your users. For this just edit an user and add a media selecting the one you just created before. Specify the UserKey and AppToken in the Send to field, separated by a | .
And voila, you're ready to use Pushbullet notifications!