all notifications failing

Scott, Ewan EWScott at scotborders.gov.uk
Mon Apr 19 15:30:15 CEST 2010


Problem was indeed with the /tmp directory permissions. Reset this back to drwxrwxrwt and mail notifications work again. 
Thanks to Patrick and Thomas for the pointers.
Regards
Ewan

-----Original Message-----
From: Thomas Guyot-Sionnest [mailto:dermoth at aei.ca] 
Sent: 17 April 2010 04:38
To: Nagios Users List
Subject: Re: [Nagios-users] all notifications failing

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 16/04/10 09:49 AM, Scott, Ewan wrote:
> Hi
> 
>  [...]
> 
> # su - nagios
> 
> $ /usr/bin/printf "%b" "***** Nagios *****\nNotification " |
> /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: 
> $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" ewscott at scotborders.gov.uk
> 
> mail: Cannot open temporary file: Permission denied
> 
> Cannot open temporary file

Use strace to find out what fails. strace will print all syscalls used
by the traced program and wou will see which one (including parameters)
failed.


Don't forget to trace the mail program, not printf. i.e.:

> $/usr/bin/printf "%b" "***** Nagios *****\nNotification " | strace
> /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert:
> $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"
ewscott at scotborders.gov.uk 2>/tmp/mail_trace.log


Here I added "strace" before "/usr/bin/mail" and redirected stderr to
"/tmp/mail_trace.log". Then you can look at "/tmp/mail_trace.log" for
something like a failed open() call or for ENOPERM. The argument to the
failed call should indicate which file failed.


- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFLyS0X6dZ+Kt5BchYRAgeuAJ46zQNJ+mdWLj94agD1qihi/pvZ1QCdGvlj
gUs8215gRrSW21kl3wDq9CY=
=o+AZ
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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 email and any files transmitted with it are privileged, confidential and subject to copyright. Any unauthorised use or disclosure of any part of this email is prohibited. If you are not the intended recipient please inform the sender immediately; you should then delete the email and remove any copies from your system.
The views or opinions expressed in this communication may not necessarily be those of Scottish Borders Council.
Please be advised that Scottish Borders Council's incoming and outgoing email is subject to regular monitoring and any email may require to be disclosed by the Council under the provisions of the Freedom of Information (Scotland) Act 2002.

**********************************************************************


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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