How configure Nagios to send periodic notifications?
Arnau
arnaulist at andromeiberica.com
Thu Apr 30 13:57:53 CEST 2009
Hi all,
Assaf Flatto wrote:
> hello
>
> You want to take a look at the external commands :
>
> http://www.nagios.org/developerinfo/externalcommands/commandinfo.php?command_id=135
>
I have upgraded from nagios2 to nagios3 and now when I execute the shell
script that fires the external command it runs fine. The problem is that
nagios doesn't fire a mail. I have done the following. I have created a
shell script that it should be executed via a cron task and everytime it
should send an email fired by the service.
------------------------------
#!/bin/sh
# This is a sample shell script showing how you can submit the
SEND_CUSTOM_SVC_NOTIFICATION command
# to Nagios. Adjust variables to fit your environment as necessary.
now=`date +%s`
commandfile='/var/lib/nagios3/rw/nagios.cmd'
/usr/bin/printf "[%lu]
SEND_CUSTOM_SVC_NOTIFICATION;192.168.10.26;MAILPARSER_TEST;2;test;Testing
if everything is OK\n" $now > $commandfile
--------------------------------------
And I have defined the following service
--------------------------------------
define service {
service_description MAILPARSER_TEST
check_command return-critical
normal_check_interval 2
use generic-service
notification_interval 0
}
--------------------------------------
And never sends a mail as it normally does with all the other services I
have. Any idea?
Cheers!!
> Assaf
>
> On Friday 24 April 2009 15:48:39 Arnau wrote:
>
>> Hi all,
>>
>> Since few weeks ago we use Nagios as monitoring system and everytime
>> there is a problem it notifies sending an email. We have a system that
>> parses those emails and using a text to speech system it makes a phone
>> call. To be sure that the alarm system is running we have periodic calls
>> launched by emails programmed as cron tasks. I'm worried that some of
>> the Nagios notifications could be lost or even it wouldn't sent any
>> notification, so I'd like to launch to substitute those cron emails by
>> Nagios "fake" notifications or something similar.
>>
>> Do you know if there is a way to force Nagios to send a notification
>> periodically?
>>
>> Thank you very much
>>
>> ---------------------------------------------------------------------------
>> --- Crystal Reports - New Free Runtime and 30 Day Trial
>> Check out the new simplified licensign option that enables unlimited
>> royalty-free distribution of the report engine for externally facing
>> server and web deployment.
>> http://p.sf.net/sfu/businessobjects
>> _______________________________________________
>> 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
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090430/b67dd493/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
-------------- next part --------------
_______________________________________________
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