Winpopup

Marc Powell marc at ena.com
Wed Mar 29 22:09:54 CEST 2006



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Hugo Rebello
> Sent: Wednesday, March 29, 2006 2:00 PM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Winpopup
> 
> Frederik,
> 
> I can send message by Nagios Server to my desktop manually using
> smbclient.
> The problem is when I try to do this  by Nagios Services.
> I have included the "winpopup" option below "email" option into
> contacts.cfg file, however it is doesn´t working.
> 
> Look the contacts.cfg and misccommands.cfg files below.
> 
> # 'hugo' contact definition
> define contact{
>         contact_name                                hugo
>         alias                                                 Hugo Rebello
>         service_notification_period         work
>         host_notification_period              work
>         service_notification_options        w,c,r
>         host_notification_options             d,u,r
>         service_notification_commands  notify-by-email
>         host_notification_commands       host-notify-by-email
>         email
> test at teste.com
>         winpopup                                         myhostname
>         }
> 
> # 'host notify-by-winpopup' command definition
> define command{
>         command_name    host-notify-by-winpopup
>         command_line    /usr/bin/printf "%b" "Notification Type:
> $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
> $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
> $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | smbclient -M $CONTACTPAGER$


You can't (yet) make up new directives within a definition (i.e. your 'winpopup' directive). You'll have to hijack an existing directive, use a $ARGn$ macro or a $USERn$ macro.

Judging by your host-notify-by-winpopup command, you're intending to hijack the contact pager definition ($CONTACTPAGER$) for the hostname so you'll want to set --

# 'hugo' contact definition
define contact{
        contact_name                                hugo
        alias                                                 Hugo Rebello
        service_notification_period         work
        host_notification_period              work
        service_notification_options        w,c,r
        host_notification_options             d,u,r
        service_notification_commands  notify-by-email
        host_notification_commands       host-notify-by-email,host-notify-by-winpopup
        email                                                test at teste.com
        pager                                         myhostname
        }

--
Marc


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list