How to stop sending notification after 3 times?

Wang Binbin binbin.b.wang at hotmail.com
Tue Jan 26 02:36:55 CET 2010


Kyle

Much appreciate your reply, and I am a rookie in nagios. Could you give me much detail about how to use macro $NOTIFICATIONNUMBERS$?  How can I add the "if" judge in command definition? 

Millions of thanks.


define command{
        command_name    notify-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios 2.9 *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/local/bin/sendEmail -f nagios at test.com -t $CONTACTEMAIL$ -s mail.test.com -u "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" -xu nagios 
        } 

--------------------------------------------------
From: "Kyle O'Donnell" <kyleodonnell at gmail.com>
Sent: Monday, January 25, 2010 9:54 PM
To: "Binbin Wang" <binbin.b.wang at hotmail.com>
Cc: <nagios-users at lists.sourceforge.net>
Subject: Re: [Nagios-users] How to stop sending notification after 3 times?

> you could also pass the macro $NOTIFICATIONNUMBER$ to your
> notification command, which does an if on the value.
> 
> [ $NOTIFICATIONNUMBER$ -le 3 ] && echo blah blah blah $HOSTNAME$
> $SERVICE... |mail
> 
> On 1/25/10, Binbin Wang <binbin.b.wang at hotmail.com> wrote:
>> Hi all
>>
>> I make some troubles in nagios setting. My customer just only receive
>> notification only 3 times, and stop receiving it even through that warning
>> still exists. Anyone know how to set up nagios ? thanks in advance.
>>
>> Binbin
> 
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
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