Nagios not reporting failures

James Green james.green at stealthnet.net
Wed Sep 29 18:50:42 CEST 2004


Andreas Ericsson wrote:

> Nagios shoots out alerts via external commands executed by the shell. 
> If you have any shell metachars in the output, that may cause a 
> problem like this. Typical trouble-makers include but are not limited 
> to: unclosed quotes, semi-colons, exclamation points.
>
Here is the command:

define command{
        command_name    notify-by-sms
        command_line    /opt/bin/php -f /home/jmkg/contacts.php 
$CONTACTPAGER$ tier1 'Nagios $HOSTNAME$ $HOSTSTATE$ $SERVICEDESC$ 
$SERVICESTATE$'
        }

If I run that command with sample data (taken from a near identical 
installation's log file) as the nagios user, I get an SMS and a log file 
message.

Nagios itself appears not to run it. If I could trace through exactly 
what is happening it would help me no end, can't see how though?

Nagios logs it:

1096476302] SERVICE NOTIFICATION: jmkg;s1c1;PING eth1 
xxx.xxx.xxx.xxx;CRITICAL;notify-by-sms;CRITICAL - Plugin timed out after 
10 seconds


-- 
James Green
Systems Administrator, StealthNET Ltd, www.stealthnet.co.uk
Tel: 0870 800 1777 Intl: +44 1493 660066 Fax: 0870 135 1069



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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