ZABBIX Forums  
  #1  
Old 12-02-2006, 15:10
Wolfgang Wolfgang is offline
Senior Member
Zabbix certified trainerZabbix certified specialist
 
Join Date: Apr 2005
Posts: 117
Default Sending a "Winpopup" as a notification

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.
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
-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 ;-)
__________________
http://www.intellitrend.de
Specialised in monitoring large environments and Zabbix API programming.
Reply With Quote
  #2  
Old 17-08-2006, 19:43
crashdummyMCH crashdummyMCH is offline
Member
 
Join Date: Jun 2006
Posts: 33
Default If require an IP address to make winpopup work

If your server is behind a private network this should help. It specifies an IP address to go to so you do not have to have the receipiant does not have to be part of the same workgroup.

#!/bin/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
RECEIPIANT=$1
SUBJECT=$2
MESSAGE=$3
HOST=${RECEIPIANT%|*}
IP=${RECEIPIANT#*|}
echo -e "Subject:$SUBJECT\\n$MESSAGE" | smbclient -M $HOST -I $IP

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 "netbiosname|ipaddress" of the box that should receive the message in the "send to" field. example: client1|192.168.0.0.1
-Select activate, change "when active" if required and select the severtiy according to your needs.
Reply With Quote
  #3  
Old 19-04-2010, 11:31
karzer karzer is offline
Member
 
Join Date: Mar 2010
Posts: 52
Default Domain users send popup

I do not know much English. I 'm sorry
Hi, Windows 2003 domains, including a PC user, I want to send popup! How can we do?
Reply With Quote
  #4  
Old 20-04-2010, 18:45
Tim S Tim S is offline
Junior Member
 
Join Date: Jun 2006
Posts: 13
Default

You will need to enable the Messenger service on the PCs and make an exception for it in the Windows Firewall.

For Linux PCs linpopup works well.
Reply With Quote
  #5  
Old 21-04-2010, 09:40
karzer karzer is offline
Member
 
Join Date: Mar 2010
Posts: 52
Default

The problem was corrected. Thank you very much.
Reply With Quote
  #6  
Old 21-04-2010, 16:04
karzer karzer is offline
Member
 
Join Date: Mar 2010
Posts: 52
Default

One question will be how Windows Vista can do this operation? Windows Xp message service works without any problems I had enough to open, but I do not have such a service in Vista ...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:55.