<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 5/6/09 2:36 AM, Marc Powell wrote:<br>
<br>
Hi Marc,<br>
<br>
You just saved me _lots_ of time.  It looks like someone had adjusted
the permissions on /tmp to 0700 and owned by root:root - hence no tmp
file could be created by /usr/bin/mail or /usr/bin/mailx<br>
<br>
I did a stat on the directory but it has been updated several times
since Nagios stoppped working so I'm no doubt not going to be able to
find out when it was modified and by which uid.<br>
<br>
Much appreciate your assistance!!!!<br>
<br>
<br>
<br>
Cheers<br>
<br>
<br>
<blockquote cite="mid:12168C94-6559-4F4D-9465-9178046ABBC5@ena.com"
 type="cite">
  <pre wrap="">On Jun 4, 2009, at 1:48 AM, Tim Philips wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">When a host (or service) experiences a problem the normal process  
seems to be happening (from what I see in the UI and the logs):

[1244096420] SERVICE ALERT: localhost;root /dev/mapper/VolGroup00- 
LogVol00;CRITICAL;SOFT;1;DISK CRITICAL - free space: / 17736 MB (4%  
inode=99%):
[1244096480] SERVICE ALERT: localhost;root /dev/mapper/VolGroup00- 
LogVol00;CRITICAL;SOFT;2;DISK CRITICAL - free space: / 17739 MB (4%  
inode=99%):
[1244096540] SERVICE ALERT: localhost;root /dev/mapper/VolGroup00- 
LogVol00;CRITICAL;SOFT;3;DISK CRITICAL - free space: / 17739 MB (4%  
inode=99%):
[1244096600] SERVICE ALERT: localhost;root /dev/mapper/VolGroup00- 
LogVol00;CRITICAL;HARD;4;DISK CRITICAL - free space: / 17739 MB (4%  
inode=99%):
[1244096600] SERVICE NOTIFICATION: nagiosadmin;localhost;root /dev/ 
mapper/VolGroup00-LogVol00;CRITICAL;notify-service-by-email;DISK  
CRITICAL - free space: / 17739 MB (4% inode=99%):
    </pre>
  </blockquote>
  <pre wrap=""><!---->
This is good. Nagios is trying to execute the notify-service-by-email  
command.

  </pre>
  <blockquote type="cite">
    <pre wrap="">[1244096600.198454] [032.0] [pid=7951] 1 contacts were notified.   
Next possible notification time: Thu Jun  4 19:23:20 2009
[1244096600.198514] [032.0] [pid=7951] 1 contacts were notified.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
... and nagios believes it was successful

  </pre>
  <blockquote type="cite">
    <pre wrap="">I'm able to manually use the mail command to send external e-mail  
(have attempted this several times) and can confirm that I can  
manually execute the command_line for the notification option:
    </pre>
  </blockquote>
  <pre wrap=""><!---->
as the nagios user? (just covering the base)...

  </pre>
  <blockquote type="cite">
    <pre wrap="">I have addjusted the command_line and changed it to something like  
(for example):

    command_line    echo "testing" | /usr/bin/mail -s "** TEST  
SUBJECT **" <a class="moz-txt-link-abbreviated" href="mailto:my@email.address">my@email.address</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
How about eliminating /usr/bin/mail entirely and dumping text to a  
file in /tmp?

        command_line echo `date` ' - I notified!' >> /tmp/notif.log

  </pre>
  <blockquote type="cite">
    <pre wrap="">All this said I'm not seeing anything in the mail server logs  
indicating that Nagios is even attempting to use notify-service-by- 
email and send e-mail.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
That's interesting and my money is on it being some problem related  
to /usr/bin/mail. You might try capturing the output of /usr/bin/mail  
by redirecting to a log file --

command_line    echo "testing" | /usr/bin/mail -s "** TEST SUBJECT **" <a class="moz-txt-link-abbreviated" href="mailto:my@email.address">my@email.address</a> 
  >>/tmp/mail.err 2>&1

--
Marc


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: <a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/opensolaris-get">http://p.sf.net/sfu/opensolaris-get</a>
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 

Tim Philips
Solutions Architecture Team
DTS - A Better Broadband Experience
+64-21-438-846
<a class="moz-txt-link-abbreviated" href="mailto:timp@dts.net.nz">timp@dts.net.nz</a>
<a class="moz-txt-link-abbreviated" href="http://www.dts.net.nz">www.dts.net.nz</a>
</pre>
</body>
</html>