Notifications not working [was: Re: '$' symbol being appended to command_line?]

Marc Powell marc at ena.com
Wed Jan 7 14:28:01 CET 2009


On Jan 7, 2009, at 4:48 AM, Alexis Hazell wrote:

> On 22:56:13 Tue 06-Jan-09, Marc Powell wrote:
>> Does your mail log on the nagios host show the message
>> being received and then sent further on?
>
> i created a wrapper shell script around esmtp to allow me to call
> it with the -X option, which allows one to log all mail traffic to
> a file. Running the contents of command_line manually whilst su'd to
> user 'nagios' works, with the log file containing the expected traffic
> info. But when command_line is called by nagios itself as part of
> the notification process, the log file is empty (and despite the '-v'
> [i.e. verbose] option being used in the wrapper script).

> Any suggestions as to what's going on here would be very much
> appreciated!

What's the real command_line that you're using for notifications? It  
sounds to me like a permissions or path issue. Either nagios isn't  
allowed to execute the program or can't find it. Ensure that  
permissions are correct on the program and directories above and that  
you're using /fully/qualified/paths everywhere.

You could also redirect STDOUT/STDERR to a file to see if anything is  
being reported there by adding '>/tmp/output.txt 2>&1' to the end of  
the command_line.

--
Marc

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
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