View FAQ

[ Return To FAQ Index | Search The FAQs ]

FAQ Database : Nagios : Notifications

Title:How can I send WinPopup notifications?
FAQ ID:F0063
Submitted By:Ethan Galstad 
Last Updated:09/19/2002

Description:User would like to have Nagios send WinPopup messages to various users or hosts as part of the notification process. 


This can be accomplished fairly easily if you have the Samba client installed on your monitoring machine.

Use the -M command line option to the smbclient utility to send a WinPopup message to a user on a specific host.

For example, if you wanted to send the message "Hi there!" to the user on a host name WINHOST, the following command line would do the trick:

/bin/echo "Hi there!" | smbclient -M WINHOST

An example command definition that could be used to send host notifications to a Windows box called 'ADMINHOST' (via WinPopup messages) might look like this:

define command{
        command_name    host-notify-by-winpopup
        command_line    /usr/bin/printf "%b" "Host '$HOSTALIAS$' is $HOSTSTATE$, Info: $OUTPUT$, Time: $DATETIME$" | smbclient -M ADMINHOST

As noted by Bastiaan van den Berg, if you need messages to be sent to different machines on a per-user basis , use the nmblookup utility to find out which machine the user is logged into before sending the message.

Note: Windows 95/98 machines must be running WINPOPUP.EXE in order to receive WinPopup messages. Windows NT/2000/XP machines do not need any special software running in order to receive these messages.


Keywords:samba winpopup notifications