Problem with $CONTACTADDRESS1$

Taylor Dondich tdondich at gmail.com
Thu Aug 21 23:14:52 CEST 2008


You could also use a new feature of Nagios 3.0, custom variables:

http://nagios.sourceforge.net/docs/3_0/customobjectvars.html

Be interesting to see if that works appropriately.

Taylor

On Thu, Aug 21, 2008 at 6:18 AM, Tobias Gunkel <tobias.gunkel at qumido.de> wrote:
> Hi there!
>
> I'm using Nagios 3.0.3 and I want to send notifications via SMS, so I
> configured an additional command 'notify-by-sms':
>
> define command{
>    command_name   notify-by-sms
>    command_line   /usr/local/nagios/bin/sendsms -n "$NOTIFICATIONTYPE$"
> -d "$SERVICEDESC$" -h "$HOSTALIAS$" -s "$SERVICESTATE$" -t
> "$SHORTDATETIME$" -i "$SERVICEOUTPUT$" -p "$CONTACTADDRESS1$"
>    }
>
> /usr/local/nagios/bin/sendsms sends SMS through our SMS Gateway.
> Argument -p $CONTACTADDRESS1$ represents the cell phone number.
>
> I added address1 and the 'notify-by-sms' command in my contact definition:
>
> define contact{
>         contact_name nagiosadmin
>         use generic-contact
>         alias Nagios Admin
>         service_notification_commands notify-by-sms
>         host_notification_commands notify-by-sms
>         email xxx.xxxx at yyyy.zz
>         address1 0049XXXXXXX
>         }
>
> But after restarting Nagios this setup doesnt work o_0.
>
> If I change the $CONTACTADDRESS1$ Makro into the actual phone number it
> works fine:
>
> command_line   /usr/local/nagios/bin/sendsms -n "$NOTIFICATIONTYPE$" -d
> "$SERVICEDESC$" -h "$HOSTALIAS$" -s "$SERVICESTATE$" -t
> "$SHORTDATETIME$" -i "$SERVICEOUTPUT$" -p "0049XXXXXXX"
>
> So it seems, that $CONTACTADDRESS1$ is not resolved correctly, right?
>
> What's going wrong here? Thanks for any hints and tips!
> Best regards, Tobias
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> 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
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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