<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Gautami;
        panose-1:2 0 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:navy;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Hi,<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>The following command works fine in the terminal both for
the nagios user (‘su nagios’ from root) and for the root:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>/usr/lib/nagios/plugins/check_nt –H 192.168.100.20 –p
12489 –v USEDDISKSPACE –l c –w 80 –c 90<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Both produce the desired results.<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Apache log says nothing. Nagios log is complaining about
notify-by-email having permission denied (which I knew about too and was going
to tackle that once I had done this).<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Nagios is the latest stable version (downloaded yesterday) 2.9.1.el5,
plugins is 1.4.9.-1.el5. NS Client was also downloaded yesterday – 0.2.7
although remember that it’s not even getting as far as communicating with
the client at the moment. <o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<div>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'>Kind regards,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'>Paul Broadwith
MBCS<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'>Blue Ivy Ltd -
Microsoft Small Business Specialist, UK Partner Qualified for 2007<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></p>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.5pt'>Tel.:</span></b><span
lang=EN-US style='font-size:10.5pt'> 0800 612 0601<o:p></o:p></span></p>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.5pt'>Windows
Messenger:</span></b><span lang=EN-US style='font-size:10.5pt'> <a
href="mailto:paul.broadwith@blueivy.co.uk">paul.broadwith@blueivy.co.uk</a><o:p></o:p></span></p>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.5pt'>Web:</span></b><span
lang=EN-US style='font-size:10.5pt'> <a href="http://www.blueivy.co.uk">http://www.blueivy.co.uk</a><o:p></o:p></span></p>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.5pt'>Blog:</span></b><span
lang=EN-US style='font-size:10.5pt'> <a href="http://blog.blueivy.co.uk">http://blog.blueivy.co.uk</a><o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Valdinger, Stephen (DOV, MSX)
[mailto:svalding@doverchem.com] <br>
<b>Sent:</b> 19 July 2007 16:18<br>
<b>To:</b> Paul Broadwith; nagios-users@lists.sourceforge.net<br>
<b>Subject:</b> RE: [Nagios-users] Permission Denied on check_nt<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>Check your permission on the Nagios box. Sounds like the Nagios
user cannot execute the plugin. Does it work fine in the terminal? Use ls and
grep and see what they say. Run the command in the terminal as root and as
nagios and see what the output is. Check your apache logs, and nagios logs for
any pertinent information. What version of Nagios and the plugins are you
running? What version of the NS Client? <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p> </o:p></span></p>

<div>

<p class=MsoNormal><span lang=EN-US style='color:navy'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>Stephen Valdinger<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>MIS Helpdesk Coordinator<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>330-365-3622<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'>stephen.valdinger@doverchem.com<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:navy'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:Symbol;color:navy'>·</span><span
lang=EN-US style='color:navy'>  </span><span lang=EN-US style='font-family:
Gautami;color:red'>WinErr: 079 Mouse not found - A mouse driver has not been
installed. Please click the left mouse button to continue. </span><span
lang=EN-US><o:p></o:p></span></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><span lang=EN-US
style='font-size:12.0pt;font-family:"Times New Roman","serif"'>

<hr size=2 width="100%" align=center>

</span></div>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Paul Broadwith [mailto:paul.broadwith@blueivy.co.uk]
<br>
<b>Sent:</b> Thursday, July 19, 2007 10:05 AM<br>
<b>To:</b> nagios-users@lists.sourceforge.net<br>
<b>Subject:</b> [Nagios-users] Permission Denied on check_nt</span><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>

</div>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal>Hi,<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Hoping somebody can help me out here.<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>I’ve installed Nagios on CentOS using the following
page <a href="http://www.maxsworld.org/index.php/how-tos/nagios">http://www.maxsworld.org/index.php/how-tos/nagios</a>
and been through the permissions sections here <a
href="http://nagios.sourceforge.net/docs/2_0/commandfile.html">http://nagios.sourceforge.net/docs/2_0/commandfile.html</a><o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>I have two problems now – the first one is with the
check_nt command.<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>I have installed the NS Client on the server. The server has
an ISA Firewall on there and I’ve allowed the connections and am
monitoring the traffic. I’ve configured the host, services and everything
else and they show up in the Nagios web interface fine. However whenever a
check is done, I get the error Permission Denied in the web interface. No
actual traffic is sent to the server and Nagios is not trying to connect to the
NS Client on the server (Firewall logs show no connections). If I try to run
the command from the linux server command line I get the results back.
I’ve also done an ‘su nagios’ and run the command from that
user account and it again works fine. I have a check setup for the local Nagios
server to monitor it’s disk space and that is fine. I’m assuming
it’s a permissions problem with the plugin or Nagios or something, but
don’t know where.<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Here is the check_nt entry from commands.cfg:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>define command{<o:p></o:p></p>

<p class=MsoNormal>       
command_name    check_nt<o:p></o:p></p>

<p class=MsoNormal>       
command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v
$ARG1$ $ARG2$<o:p></o:p></p>

<p class=MsoNormal>        }<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>And one of the service entries:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>define service{<o:p></o:p></p>

<p class=MsoNormal>       
host_name              
MYHOST<o:p></o:p></p>

<p class=MsoNormal>       
use                    
server-service-template<o:p></o:p></p>

<p class=MsoNormal>       
service_description     Drive Space - C:<o:p></o:p></p>

<p class=MsoNormal>       
check_command          
check_nt!USEDDISKSPACE!-l c -w 80 -c 90<o:p></o:p></p>

<p class=MsoNormal>        }<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>And the server-service-template entry is:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>define service {<o:p></o:p></p>

<p class=MsoNormal>       
name                           
server-service-template<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>       
contact_groups                 
client_monitoring<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>       
is_volatile                    
0<o:p></o:p></p>

<p class=MsoNormal>       
max_check_attempts             
3<o:p></o:p></p>

<p class=MsoNormal>       
normal_check_interval          
1<o:p></o:p></p>

<p class=MsoNormal>       
retry_check_interval           
1<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>       
active_checks_enabled          
1<o:p></o:p></p>

<p class=MsoNormal>       
passive_checks_enabled          1<o:p></o:p></p>

<p class=MsoNormal>       
check_period                   
24x7<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal># leave this unless you know what you are doing<o:p></o:p></p>

<p class=MsoNormal>       
parallelize_check              
1<o:p></o:p></p>

<p class=MsoNormal>       
obsess_over_service            
0<o:p></o:p></p>

<p class=MsoNormal>       
check_freshness                
0<o:p></o:p></p>

<p class=MsoNormal>#       freshness_threshold<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>      
 flap_detection_enabled         
0<o:p></o:p></p>

<p class=MsoNormal>       
event_handler_enabled          
0<o:p></o:p></p>

<p class=MsoNormal>#       low_flap_threshold<o:p></o:p></p>

<p class=MsoNormal>#       high_flap_threshold<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>       
process_perf_data              
1<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>       
retain_status_information       1<o:p></o:p></p>

<p class=MsoNormal>       
retain_nonstatus_information    1<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>       
notifications_enabled          
1<o:p></o:p></p>

<p class=MsoNormal>       
notification_interval          
30<o:p></o:p></p>

<p class=MsoNormal>       
notification_period            
24x7<o:p></o:p></p>

<p class=MsoNormal># w = send notifications on a WARNING state<o:p></o:p></p>

<p class=MsoNormal># u = send notifications on an UNKNOWN state<o:p></o:p></p>

<p class=MsoNormal># c = send notifications on a CRITICAL state<o:p></o:p></p>

<p class=MsoNormal># r = send notifications on recoveries (OK state)<o:p></o:p></p>

<p class=MsoNormal># f = send notifications when the service starts and stops
flapping<o:p></o:p></p>

<p class=MsoNormal># n (none) as an option, no service notifications will be
sent out<o:p></o:p></p>

<p class=MsoNormal>       
notification_options           
w,u,c,r<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>       
contact_groups                 
client_monitoring<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>       
register                       
0<o:p></o:p></p>

<p class=MsoNormal>}<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>(as you can see I like to have all of the entries in there,
even the ones that have the same default as I want)<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>The second problem I have is when I try to change the
scheduled time for the next check on a service – the error I get is:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Error: Could not stat() command file
'/var/log/nagios/rw/nagios.cmd'!<o:p></o:p></p>

<p class=MsoNormal>The external command file may be missing, Nagios may not be
running, and/or Nagios may not be checking external commands. <o:p></o:p></p>

<p class=MsoNormal>An error occurred while attempting to commit your command
for processing.<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Any suggestions to this?<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>I’m liking Nagios, but these problems are stopping me
from using it any further.<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'>Kind regards,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'>Paul Broadwith
MBCS<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'>Blue Ivy Ltd -
Microsoft Small Business Specialist, UK Partner Qualified for 2007<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></p>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.5pt'>Tel.:</span></b><span
lang=EN-US style='font-size:10.5pt'> 0800 612 0601<o:p></o:p></span></p>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.5pt'>Windows
Messenger:</span></b><span lang=EN-US style='font-size:10.5pt'> <a
href="mailto:paul.broadwith@blueivy.co.uk">paul.broadwith@blueivy.co.uk</a><o:p></o:p></span></p>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.5pt'>Web:</span></b><span
lang=EN-US style='font-size:10.5pt'> <a href="http://www.blueivy.co.uk">http://www.blueivy.co.uk</a><o:p></o:p></span></p>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.5pt'>Blog:</span></b><span
lang=EN-US style='font-size:10.5pt'> <a href="http://blog.blueivy.co.uk">http://blog.blueivy.co.uk</a><o:p></o:p></span></p>

<p class=MsoNormal><o:p> </o:p></p>

<div class=MsoNormal align=center style='text-align:center'><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'>

<hr size=2 width="100%" align=center>

</span></div>

<p><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Blue Ivy
Limited is a limited company registered in Scotland.<br>
Registered company number: SC 221649.  Registered VAT number: GB 774 8460
88.<br>
Registered Office: 67 Kelburn Street, Barrhead, Glasgow, G78 1LD</span><o:p></o:p></p>

<p><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>This message
and any associated files is intended only for the use of
nagios-users@lists.sourceforge.net and may contain information that is
confidential, subject to copyright or constitutes a trade secret. If you are
not nagios-users@lists.sourceforge.net you are hereby notified that any
dissemination, copying or distribution of this message, or files associated
with this message, is strictly prohibited. If you have received this message in
error, please notify paul.broadwith@blueivy.co.uk immediately by replying to
the message and then deleting it from your computer. </span><o:p></o:p></p>

<p><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Any views or
opinions presented are solely those of the author paul.broadwith@blueivy.co.uk
and do not necessarily represent those of the company.</span><o:p></o:p></p>

<div class=MsoNormal align=center style='text-align:center'><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'>

<hr size=2 width="100%" align=center>

</span></div>

</div>

</body>

<!--[object_id=#blueivy.co.uk#]--><P><FONT face=Arial size=2>
<HR>
</FONT></P>
<P><FONT face=Arial size=2>Blue Ivy Limited is a limited company registered in Scotland.<BR>Registered company number: SC 221649.  Registered VAT number: GB 774 8460 88.<BR>Registered Office: 67 Kelburn Street, Barrhead, Glasgow, G78 1LD</FONT></P>
<P><FONT face=Arial size=2>This message and any associated files is intended only for the use of recipient</FONT><A href="mailto:frank.mccaffery@wff-highland.org.uk"></A><FONT face=Arial size=2> and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not recipient</FONT><A href="mailto:frank.mccaffery@wff-highland.org.uk"></A><FONT face=Arial size=2> you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify paul.broadwith@blueivy.co.uk</FONT><A href="mailto:paul.broadwith@blueivy.co.uk"></A><FONT face=Arial size=2> immediately by replying to the message and then deleting it from your computer. </FONT></P>
<P><FONT face=Arial size=2>Any views or opinions presented are solely those of the author paul.broadwith@blueivy.co.uk</FONT><A href="mailto:paul.broadwith@blueivy.co.uk"></A><FONT face=Arial size=2> and do not necessarily represent those of the company.</FONT></P>
<P><FONT face=Arial size=2>
<HR>

<P></P></FONT></html>