Permission Denied on check_nt

Marc Powell marc at ena.com
Thu Jul 19 20:24:25 CEST 2007


<leaving response intact for the benefit of the archives>

> -----Original Message-----
> From: Paul Broadwith [mailto:paul.broadwith at blueivy.co.uk]
> Sent: Thursday, July 19, 2007 12:34 PM
> To: Marc Powell
> Subject: RE: [Nagios-users] Permission Denied on check_nt
> 
> Hi Marc,
> 
> The output from the Nagios.log for the unsuccessful command is:
> 
> ===
> [1184854600] SERVICE ALERT: MYHOST;Drive Space -
> D:;CRITICAL;HARD;3;Permis
> sion denied
> [1184854600] SERVICE NOTIFICATION:
> blueivy_client_monitoring;MYHOST;Drive
> Space - D:;CRITICAL;notify-by-email;Permission denied
> ===
> 
> (this is only one entry - all the services to this box fails but they
> all say the same thing). The last one about the notify-by-email I can
> sort once I get the monitoring sorted!
> 
> The plugin checking the diskspace on the Nagios server itself uses
> $USER1$ so I'm putting two and two together and assuming it is
correct.
> 
> I did as you suggested and added 'echo' at the start of the command
and
> the output in the 'Status Information' column of the web interface is:
> 
> ===
> /usr/lib/nagios/plugins/check_nt -H 192.168.100.20 -p 12489 -v
> USEDDISKSPACE -l d -w 80 -c 90
> ===
> 
> Which as far as I can see is correct.
> 
> I copied that command above and pasted it into the terminal command
> window and ran it (under root and nagios) and it returned the correct
> information:
> 
> ===
> d:\ - total: 129.51 Gb - used: 84.47 Gb (65%) - free 45.04 Gb (35%) |
> 'd:\ Used Space'=84.47Gb;103.61;116.56;0.00;129.51
> ===
> 
> You asked if I changed the check from some other configuration. My
> installation of Nagios didn't come with check_nt anywhere so I got it
> from the page I set Nagios up from
> (http://www.maxsworld.org/index.php/how-tos/nagios), removed the -s
> option and added it to the commands.cfg file.
> 
> There is only one instance of 'nagios' running (according to ps).
> 
> For the second issue, SELinux is not enabled (according to the CentOS
> Setup it's disabled) and as far as I know I have followed the
> instructions carefully. I will go over them again though.

We're definitely getting really obscure now. Pretty clearly you're
experiencing a standard permissions issue for both commands. Everything
we've looked at so far has been correct. Do you have other check_nt
commands that are working successfully? Is nagios really running as the
user nagios? Does the value of nagios_user in nagios.cfg match the owner
of the plugins? The plugins are executable by that user? I know you're
testing as the nagios user but the possibility exists that nagios isn't
running as that user. I would be doubly sure that SELinux isn't enabled
by verifying that you don't see avc denied messages in /var/log/messages
but that's probably not the issue. Beyond that, I'm not really sure
where to go...

--
Marc


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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