OS lvl scripts not running

Tim Clarke Tim.Clarke at manifest.co.uk
Tue Aug 11 12:35:47 CEST 2009


Hi all
New nagios 3.0.5-1 (plugins are all v1.4.13-11) install via yum on FC10.
All working perfectly apart from non-nagios commands. I have installed
smstools v3.1.3-1 and smssend to my phone works fine from the command
line. I have even enabled nagios with a shell and smssend works as the
nagios user. I have events in the nagios log saying its sent an sms and
an alert email:

Aug 11 11:12:38 man6 nagios: SERVICE NOTIFICATION: alladmins;man3;MySQL
mysql database;OK;notify-service-by-sms;Uptime: 5  Threads: 1
Questions: 7  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables:
6  Queries per second avg: 1.400
Aug 11 11:12:38 man6 nagios: SERVICE NOTIFICATION: alladmins;man3;MySQL
mysql database;OK;notify-service-by-email;Uptime: 5  Threads: 1
Questions: 7  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables:
6  Queries per second avg: 1.400
Aug 11 11:12:38 man6 nagios: SERVICE NOTIFICATION:
timc-private;man3;MySQL mysql database;OK;notify-service-by-sms;Uptime:
5  Threads: 1  Questions: 7  Slow queries: 0  Opens: 12  Flush tables: 1
Open tables: 6  Queries per second avg: 1.400
Aug 11 11:12:38 man6 nagios: SERVICE NOTIFICATION:
timc-private;man3;MySQL mysql
database;OK;notify-service-by-email;Uptime: 5  Threads: 1  Questions: 7
Slow queries: 0  Opens: 12  Flush tables: 1  Open tables: 6  Queries per
second avg: 1.400

The email turns up instantly but not the sms.

Here's the /etc/nagios/objects/commands.cfg entry which you can see by
the log above is firing:
define command{
        command_name    notify-service-by-sms
        command_line    /usr/bin/smssend $CONTACTPAGER$ "Nagios -
$NOTIFICATIONTYPE$ : $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$
($OUTPUT$)"
#       command_line    /usr/bin/printf "%b" "To:
$CONTACTPAGER$\n\nNagios - $NOTIFICATIONTYPE$ :
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ ($OUTPUT$)" > `
mktemp /tmp/out_XXXXXX`
        }

And you can see the commented out test I put in to see if it would run
*anything* - that commented out line fails too.

Any hints/debug/config/slaps around the head much appreciated.

Tim

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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