Nagios not reporting failures

Tedman Eng teng at dataway.com
Thu Sep 30 01:22:46 CEST 2004


Look at possibly environment setup.  When you sudo to nagios user, you
retain your original login environment (root, jgreen, etc).  The nagios user
may not have everything configured exactly.  Possibly php needs to have some
environment variables set explicitly if this is the case.  Try to login as
nagios (to check environment) rather than just su/sudo nagios (which checks
only permissions).

-----Original Message-----
From: James Green [mailto:james.green at stealthnet.net]
Sent: Wednesday, September 29, 2004 9:51 AM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Nagios not reporting failures


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


-------------------------------------------------------
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