Hey Timothy,<br><br>By reading some old mails in the mailing list, I stumbled over a topic similar to your case from 2011-12-09 (SELinux and RHEL6.2 preventing disk checks via NRPE). I know you said you didn't use SELinux, but I think it doesn't hurt if you read it in the archive:<br>
<a href="http://sourceforge.net/mailarchive/forum.php?thread_name=15tzkf1x503.fsf%40tux.uio.no&forum_name=nagios-users">http://sourceforge.net/mailarchive/forum.php?thread_name=15tzkf1x503.fsf%40tux.uio.no&forum_name=nagios-users</a><br>
<br><br><br><div class="gmail_quote">On Tue, Mar 13, 2012 at 9:03 AM, Wenig, Michael (IT/I4Z) <span dir="ltr"><<a href="mailto:michael.wenig@ww-informatik.de">michael.wenig@ww-informatik.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
We had some similar issues which were originated in missing policies for SELinux.<br>
<br>
-----Ursprüngliche Nachricht-----<br>
Von: Boyer, Timothy A. [mailto:<a href="mailto:Timothy.Boyer@opm.gov">Timothy.Boyer@opm.gov</a>]<br>
Gesendet: Montag, 12. März 2012 20:57<br>
An: Nagios Users List<br>
Betreff: Re: [Nagios-users] check_disk '/sys not accessable'<br>
<div><div></div><div class="h5"><br>
Works fine on all of the other RHEL6 systems.<br>
<br>
# su - nagios<br>
-bash-4.1$ /usr/lib64/nagios/plugins/check_nrpe -H system3 -c check_all_disk 20 10 DISK OK - free space: / 24673 MB (98% inode=99%); /dev/shm 12007 MB (100% inode=99%); /boot 154 MB (65% inode=99%);<br>
<br>
... with nothing at all in sudoers.<br>
<br>
<br>
-----Original Message-----<br>
From: davor grgicevic [mailto:<a href="mailto:dgrgicevic@gmail.com">dgrgicevic@gmail.com</a>]<br>
Sent: Monday, March 12, 2012 1:32 PM<br>
To: Nagios Users List<br>
Subject: Re: [Nagios-users] check_disk '/sys not accessable'<br>
<br>
Hi  Timothy<br>
<br>
localy  u r workiong  as  root..  if  you  try  as  user Nagios, it wont  work ..<br>
<br>
u  have to  run sudo for  this<br>
<br>
"DISK CRITICAL - /dev/pts is not accessible: Permission denied"<br>
<br>
davor<br>
<br>
<br>
<br>
On Mon, Mar 12, 2012 at 6:17 PM, Boyer, Timothy A.<br>
<<a href="mailto:Timothy.Boyer@opm.gov">Timothy.Boyer@opm.gov</a>> wrote:<br>
> $ ./check_disk -w 10% -c 5% -p /sys<br>
><br>
> DISK UNKNOWN - free space:|<br>
><br>
><br>
><br>
> is the result on both servers.<br>
><br>
><br>
><br>
> But that’s running locally, which works.  The problem is when running<br>
> via nrpe.<br>
><br>
><br>
><br>
> Running check_nrpe with –x /sys in the command line returns:<br>
><br>
><br>
><br>
> DISK CRITICAL - /dev/pts is not accessible: Permission denied<br>
><br>
><br>
><br>
> Doing the next obvious thing and including /dev in the excludes works,<br>
> and is a workaround.<br>
><br>
><br>
><br>
> Thanks much…<br>
><br>
><br>
><br>
><br>
><br>
> From: Claudio Kuenzler [mailto:<a href="mailto:ck@claudiokuenzler.com">ck@claudiokuenzler.com</a>]<br>
> Sent: Friday, March 09, 2012 7:46 AM<br>
> To: Nagios Users List<br>
><br>
><br>
> Subject: Re: [Nagios-users] check_disk '/sys not accessable'<br>
><br>
><br>
><br>
> Nagios 3.3.1.  Two identical RHEL6.1 systems, and all I’m trying to do<br>
> is get a total disk space reading.<br>
><br>
><br>
> Well the systems are not identical as the manually launched plugin<br>
> output of yours shows:<br>
><br>
> [nagios@server1 ~)$ /usr/lib/nagios/plugins/check_disk -w20% -c10%<br>
><br>
> DISK OK - free space: / 24673 MB (98% inode=99%); /dev/shm 12007 MB<br>
> (100% inode=99%); /boot 154 MB (65% inode=99%); /home 7507 MB (98%<br>
> inode=99%);<br>
><br>
><br>
><br>
> [nagios@server2 /]$ /usr/lib/nagios/plugins/check_disk -w20% -c10%<br>
> DISK OK - free space: / 22004 MB (77% inode=96%); /dev/shm 498 MB<br>
> (100% inode=99%); /boot 387 MB (84% inode=99%);<br>
><br>
><br>
> Note the /home mount point.<br>
><br>
> Have you checked the servers for the different mount points? It looks<br>
> like on server2 /sys is seen as a partition or mount point while on<br>
> server1 the check seems to "ignore" it successfully? Any idea why<br>
> server2 thinks /sys is a partition or mount point?<br>
><br>
> Can you try to launch it specifically on /sys and output the results<br>
> (on both servers)?<br>
><br>
> ./check_disk -w 10% -c 5% -p /sys<br>
><br>
> Then try to exclude /sys from the check:<br>
><br>
> ./check_disk -w 10% -c 5% -x /sys<br>
><br>
> By the way the error you're seeing seems to be triggered from this<br>
> code (at the bottom of the source file):<br>
><br>
> void<br>
> stat_path (struct parameter_list *p)<br>
> {<br>
>   /* Stat entry to check that dir exists and is accessible */<br>
>   if (verbose >= 3)<br>
>     printf("calling stat on %s\n", p->name);<br>
>   if (stat (p->name, &stat_buf[0])) {<br>
>     if (verbose >= 3)<br>
>       printf("stat failed on %s\n", p->name);<br>
>     printf("DISK %s - ", _("CRITICAL"));<br>
>     die (STATE_CRITICAL, _("%s %s: %s\n"), p->name, _("is not<br>
> accessible"), strerror(errno));<br>
>   }<br>
> }<br>
><br>
><br>
><br>
> On Fri, Mar 9, 2012 at 1:16 PM, Boyer, Timothy A.<br>
> <<a href="mailto:Timothy.Boyer@opm.gov">Timothy.Boyer@opm.gov</a>><br>
> wrote:<br>
><br>
> It's Permissive, so that can't be it.  Thanks...<br>
><br>
><br>
> -----Original Message-----<br>
> From: Sigmund Brandstaetter [mailto:<a href="mailto:sb@maniladev.com">sb@maniladev.com</a>]<br>
> Sent: Thursday, March 08, 2012 4:12 PM<br>
> To: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
> Subject: Re: [Nagios-users] check_disk '/sys not accessable'<br>
><br>
> Tim,<br>
><br>
> How about SELinux, is it maybe on only on the one that is making the<br>
> problem?<br>
><br>
> Cheers<br>
> Sigmund<br>
><br>
><br>
><br>
> On 3/9/2012 00:49, Boyer, Timothy A. wrote:<br>
>> Nagios 3.3.1. Two identical RHEL6.1 systems, and all I'm trying to do<br>
>> is get a total disk space reading. So nrpe is running on both, with<br>
>> the identical command in nrpe.cfg:<br>
>> command[check_all_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$<br>
>> -c $ARG2$ command[check_all_disk]=/usr/lib/nagios/plugins/check_disk<br>
>> -w $ARG1$ -c $ARG2$ Running as user nagios from the central server.<br>
>> One works fine:<br>
>> -sh-4.1$ /usr/lib/nagios/plugins/check_nrpe -H server1 -c<br>
>> check_all_disk -a 20% 10% DISK OK - free space: / 24673 MB (98%<br>
>> inode=99%); /dev/shm 12007 MB (100% inode=99%); /boot 154 MB (65%<br>
>> inode=99%); /home 7507 MB (98% inode=99%); the other gives me this:<br>
>> -sh-4.1$ /usr/lib/nagios/plugins/check_nrpe -H server2 -c<br>
>> check_all_disk -a 20% 10% DISK CRITICAL - /sys is not accessible:<br>
>> Permission denied Identical versions of nrpe (2.12); a diff on<br>
>> check_disk shows they're both identical; both commands work correctly<br>
>> locally run as user Nagios:<br>
>> [nagios@server1 ~)$ /usr/lib/nagios/plugins/check_disk -w20% -c10%<br>
>> DISK OK - free space: / 24673 MB (98% inode=99%); /dev/shm 12007 MB<br>
>> (100% inode=99%); /boot 154 MB (65% inode=99%); /home 7507 MB (98%<br>
>> inode=99%);<br>
>> [nagios@server2 /]$ /usr/lib/nagios/plugins/check_disk -w20% -c10%<br>
>> DISK OK - free space: / 22004 MB (77% inode=96%); /dev/shm 498 MB<br>
>> (100% inode=99%); /boot 387 MB (84% inode=99%); Multiple other nrpe<br>
>> commands running on both; this is the only thing they're having<br>
>> problems with.<br>
>> /sys is user-readable in both. Logs show nothing.<br>
><br>
>> I've run out of ideas. Pointers in the right direction appreciated...<br>
><br>
>> Tim<br>
>><br>
>><br>
>><br>
</div></div>>> ---------------------------------------------------------------------<br>
>> --------- Virtualization&  Cloud Management Using Capacity Planning<br>
<div class="im">>> Cloud computing makes use of virtualization - but cloud computing<br>
>> also focuses on allowing computing to be delivered as a service.<br>
>> <a href="http://www.accelacomm.com/jaw/sfnl/114/51521223/" target="_blank">http://www.accelacomm.com/jaw/sfnl/114/51521223/</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Nagios-users mailing list<br>
>> <a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
>> <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
>> ::: Please include Nagios version, plugin version (-v) and OS when<br>
>> reporting any issue.<br>
>> ::: Messages without supporting info will risk being sent to<br>
>> /dev/null<br>
><br>
><br>
> --<br>
> ---------------------<br>
> Sigmund Brandstaetter<br>
> Check my Blog<br>
> Live from Manila<br>
> <a href="http://maniladev.com" target="_blank">http://maniladev.com</a><br>
> ---------------------<br>
><br>
><br>
> ----------------------------------------------------------------------<br>
</div>> -------- Virtualization & Cloud Management Using Capacity Planning<br>
<div class="im">> Cloud computing makes use of virtualization - but cloud computing also<br>
> focuses on allowing computing to be delivered as a service.<br>
> <a href="http://www.accelacomm.com/jaw/sfnl/114/51521223/" target="_blank">http://www.accelacomm.com/jaw/sfnl/114/51521223/</a><br>
> _______________________________________________<br>
> Nagios-users mailing list<br>
> <a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
> ::: Please include Nagios version, plugin version (-v) and OS when<br>
> reporting any issue.<br>
> ::: Messages without supporting info will risk being sent to /dev/null<br>
><br>
> ----------------------------------------------------------------------<br>
</div>> -------- Virtualization & Cloud Management Using Capacity Planning<br>
<div class="im">> Cloud computing makes use of virtualization - but cloud computing also<br>
> focuses on allowing computing to be delivered as a service.<br>
> <a href="http://www.accelacomm.com/jaw/sfnl/114/51521223/" target="_blank">http://www.accelacomm.com/jaw/sfnl/114/51521223/</a><br>
> _______________________________________________<br>
> Nagios-users mailing list<br>
> <a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
> ::: Please include Nagios version, plugin version (-v) and OS when<br>
> reporting any issue.<br>
> ::: Messages without supporting info will risk being sent to /dev/null<br>
><br>
><br>
><br>
><br>
> ----------------------------------------------------------------------<br>
</div>> -------- Try before you buy = See our experts in action!<br>
<div><div></div><div class="h5">> The most comprehensive online learning library for Microsoft<br>
> developers is just $99.99! Visual Studio, SharePoint, SQL - plus<br>
> HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!<br>
> <a href="http://p.sf.net/sfu/learndevnow-dev2" target="_blank">http://p.sf.net/sfu/learndevnow-dev2</a><br>
> _______________________________________________<br>
> Nagios-users mailing list<br>
> <a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
> ::: Please include Nagios version, plugin version (-v) and OS when<br>
> reporting any issue.<br>
> ::: Messages without supporting info will risk being sent to /dev/null<br>
<br>
------------------------------------------------------------------------------<br>
Try before you buy = See our experts in action!<br>
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!<br>
<a href="http://p.sf.net/sfu/learndevnow-dev2" target="_blank">http://p.sf.net/sfu/learndevnow-dev2</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
------------------------------------------------------------------------------<br>
Try before you buy = See our experts in action!<br>
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!<br>
<a href="http://p.sf.net/sfu/learndevnow-dev2" target="_blank">http://p.sf.net/sfu/learndevnow-dev2</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</div></div>*******************************************************************************<br>
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.<br>
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten<br>
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.<br>
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht<br>
gestattet.<br>
<br>
This email may contain confidential and/or privileged information.<br>
If you are not the intended recipient (or have received this email<br>
in error) please notify the sender immediately and destroy this email.<br>
Any unauthorized copying, disclosure or distribution of the material<br>
in this email is strictly forbidden.<br>
*******************************************************************************<br>
------------------------------------------------------------------------------<br>
Keep Your Developer Skills Current with LearnDevNow!<br>
<div class="im">The most comprehensive online learning library for Microsoft developers<br>
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,<br>
Metro Style Apps, more. Free future releases when you subscribe now!<br>
</div><a href="http://p.sf.net/sfu/learndevnow-d2d" target="_blank">http://p.sf.net/sfu/learndevnow-d2d</a><br>
<div><div></div><div class="h5">_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null</div></div></blockquote></div><br>