<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)"><style><!--
/* Font Definitions */
@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:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></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-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>$ ./check_disk -w 10% -c 5% -p /sys<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>DISK UNKNOWN - free space:|<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>is the result on both servers.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>But that’s running locally, which works.  The problem is when running via nrpe.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Running check_nrpe with –x /sys in the command line returns:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>DISK CRITICAL - /dev/pts is not accessible: Permission denied<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Doing the next obvious thing and including /dev in the excludes works, and is a workaround.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks much…<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Claudio Kuenzler [mailto:ck@claudiokuenzler.com] <br><b>Sent:</b> Friday, March 09, 2012 7:46 AM<br><b>To:</b> Nagios Users List<br><b>Subject:</b> Re: [Nagios-users] check_disk '/sys not accessable'<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>Nagios 3.3.1.  Two identical RHEL6.1 systems, and all I’m trying to do is get a total disk space reading.  </span><o:p></o:p></p></blockquote><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Calibri","sans-serif"'><br>Well the systems are not identical as the manually launched plugin output of yours shows:</span><o:p></o:p></p><div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>[nagios@server1 ~)$ /usr/lib/nagios/plugins/check_disk -w20% -c10%<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>DISK OK - free space: / 24673 MB (98% inode=99%); /dev/shm 12007 MB (100% inode=99%); /boot 154 MB (65% inode=99%); /home 7507 MB (98% inode=99%); <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'> <o:p></o:p></span></p></div><div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>[nagios@server2 /]$ /usr/lib/nagios/plugins/check_disk -w20% -c10%<br>DISK OK - free space: / 22004 MB (77% inode=96%); /dev/shm 498 MB (100% inode=99%); /boot 387 MB (84% inode=99%);<o:p></o:p></span></p></blockquote><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Calibri","sans-serif"'><br>Note the /home mount point.<br><br>Have you checked the servers for the different mount points? It looks like on server2 /sys is seen as a partition or mount point while on server1 the check seems to "ignore" it successfully? Any idea why server2 thinks /sys is a partition or mount point?<br><br>Can you try to launch it specifically on /sys and output the results (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 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><b>    printf("DISK %s - ", _("CRITICAL"));<br>    die (STATE_CRITICAL, _("%s %s: %s\n"), p->name, _("is not accessible"), strerror(errno));</b><br>  }<br>}<o:p></o:p></span></p></div><p class=MsoNormal style='margin-bottom:12.0pt'><br><br><o:p></o:p></p><div><p class=MsoNormal>On Fri, Mar 9, 2012 at 1:16 PM, Boyer, Timothy A. <<a href="mailto:Timothy.Boyer@opm.gov">Timothy.Boyer@opm.gov</a>> wrote:<o:p></o:p></p><p class=MsoNormal>It's Permissive, so that can't be it.  Thanks...<o:p></o:p></p><div><div><p class=MsoNormal><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$<br>> command[check_all_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$<br>> -c $ARG2$<br>> 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%<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>> 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%<br>> DISK CRITICAL - /sys is not accessible: Permission denied<br>> Identical versions of nrpe (2.12); a diff on check_disk shows they're<br>> both identical; both commands work correctly 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%);<br>> Multiple other nrpe commands running on both; this is the only thing<br>> they're having problems with.<br>> /sys is user-readable in both. Logs show nothing.<o:p></o:p></p></div></div><p class=MsoNormal>> I've run out of ideas. Pointers in the right direction appreciated...<o:p></o:p></p><div><div><p class=MsoNormal>> Tim<br>><br>><br>> ------------------------------------------------------------------------------<br>> Virtualization&  Cloud Management Using Capacity Planning<br>> 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 reporting any issue.<br>> ::: Messages without supporting info will risk being sent to /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>Virtualization & Cloud Management Using Capacity Planning<br>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>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>------------------------------------------------------------------------------<br>Virtualization & Cloud Management Using Capacity Planning<br>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>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<o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>