OS lvl scripts not running

Tim Clarke Tim.Clarke at manifest.co.uk
Tue Aug 11 18:05:21 CEST 2009


-----Original Message-----
> From: Marc Powell [mailto:marc at ena.com]
> Sent: Tue 11/08/2009 3:17 PM
> To: Nagios User list
> Subject: Re: [Nagios-users] OS lvl scripts not running
>  
> 
> On Aug 11, 2009, at 5:35 AM, Tim Clarke wrote:
> 
> > 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.40
> 
> Nagios is executing your command_line. This is good.
> 
> > 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.
> 
> I can't speak to smssend but as for your test, you can't depend on the  
> location of mktemp to be in your $PATH. Try specifying the full path  
> the mktemp in the command_line or just hard-code a filename for this  
> specific test.
> 
> --
> Marc

Marc

Thanks for stimulating the little grey cells, it turned out to be a non-ascii set of double-quotes in the command line.

The oldies are the best. That'll teach me to paste from web pages...

Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090811/f9b2502e/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- 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