When doing tests that trigger/action work as expected, or if someone wants to get a an instant notification that an event happened i found it useful to use a simple winpopup. Can be send to windows boxes given that the windows messenger service is running, or on linux platforms if configured properly.
It is quite easy to setup:
-Install smbclient on the zabbix-server.
-Create the following simple script that will later be used to send the message. Store it in the directory that zabbix server uses for scripts.
Default ist /home/zabbix/bin but this can be changed in the zabbix_server-conf.
-Test the script as user zabbix.
Note: This part just explains how to create and assign a custom media type
-Create a new media, type=script, Name it for example "WinPopup" and assign the previously created script.
-Go to the user configuration of the user that you use for alerting, and create a new media for each box, that should receive later the WinPopups.
(Note: This should also work for groups, but i had a problem using groups in triggers in beta6)
-Select the Media (in this example WinPopup) and put the netbios name of the box that should receive the message in the "send to" field.
-Select activate, change "when active" if required and select the severtiy according to your needs.
-Now setup a trigger, action and assign "send to" to the user that you assigned the media "Winpopup".
Done ;-)
It is quite easy to setup:
-Install smbclient on the zabbix-server.
-Create the following simple script that will later be used to send the message. Store it in the directory that zabbix server uses for scripts.
Default ist /home/zabbix/bin but this can be changed in the zabbix_server-conf.
Code:
#!/bin/bash #winpopup.sh # Send a zabbix message via winpopup to a given host # Use as an alertscript within zabbix # Syntax: winpopup $receiptant $subject $message # Note: zabbix passes $1=receiptiant, $2=subject, $3=message to any script echo -e "Subject:$2\\n$3" | smbclient -M $1
Note: This part just explains how to create and assign a custom media type
-Create a new media, type=script, Name it for example "WinPopup" and assign the previously created script.
-Go to the user configuration of the user that you use for alerting, and create a new media for each box, that should receive later the WinPopups.
(Note: This should also work for groups, but i had a problem using groups in triggers in beta6)
-Select the Media (in this example WinPopup) and put the netbios name of the box that should receive the message in the "send to" field.
-Select activate, change "when active" if required and select the severtiy according to your needs.
-Now setup a trigger, action and assign "send to" to the user that you assigned the media "Winpopup".
Done ;-)
Comment