check_disk '/sys not accessable'

Boyer, Timothy A. Timothy.Boyer at opm.gov
Mon Mar 12 20:56:46 CET 2012


Works fine on all of the other RHEL6 systems.

# su - nagios
-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%);

... with nothing at all in sudoers.


-----Original Message-----
From: davor grgicevic [mailto:dgrgicevic at gmail.com] 
Sent: Monday, March 12, 2012 1:32 PM
To: Nagios Users List
Subject: Re: [Nagios-users] check_disk '/sys not accessable'

Hi  Timothy

localy  u r workiong  as  root..  if  you  try  as  user Nagios, it
wont  work ..

u  have to  run sudo for  this

"DISK CRITICAL - /dev/pts is not accessible: Permission denied"

davor



On Mon, Mar 12, 2012 at 6:17 PM, Boyer, Timothy A.
<Timothy.Boyer at opm.gov> wrote:
> $ ./check_disk -w 10% -c 5% -p /sys
>
> DISK UNKNOWN - free space:|
>
>
>
> is the result on both servers.
>
>
>
> But that’s running locally, which works.  The problem is when running via
> nrpe.
>
>
>
> Running check_nrpe with –x /sys in the command line returns:
>
>
>
> DISK CRITICAL - /dev/pts is not accessible: Permission denied
>
>
>
> Doing the next obvious thing and including /dev in the excludes works, and
> is a workaround.
>
>
>
> Thanks much…
>
>
>
>
>
> From: Claudio Kuenzler [mailto:ck at claudiokuenzler.com]
> Sent: Friday, March 09, 2012 7:46 AM
> To: Nagios Users List
>
>
> Subject: Re: [Nagios-users] check_disk '/sys not accessable'
>
>
>
> Nagios 3.3.1.  Two identical RHEL6.1 systems, and all I’m trying to do is
> get a total disk space reading.
>
>
> Well the systems are not identical as the manually launched plugin output of
> yours shows:
>
> [nagios at server1 ~)$ /usr/lib/nagios/plugins/check_disk -w20% -c10%
>
> 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%);
>
>
>
> [nagios at server2 /]$ /usr/lib/nagios/plugins/check_disk -w20% -c10%
> DISK OK - free space: / 22004 MB (77% inode=96%); /dev/shm 498 MB (100%
> inode=99%); /boot 387 MB (84% inode=99%);
>
>
> Note the /home mount point.
>
> 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?
>
> Can you try to launch it specifically on /sys and output the results (on
> both servers)?
>
> ./check_disk -w 10% -c 5% -p /sys
>
> Then try to exclude /sys from the check:
>
> ./check_disk -w 10% -c 5% -x /sys
>
> By the way the error you're seeing seems to be triggered from this code (at
> the bottom of the source file):
>
> void
> stat_path (struct parameter_list *p)
> {
>   /* Stat entry to check that dir exists and is accessible */
>   if (verbose >= 3)
>     printf("calling stat on %s\n", p->name);
>   if (stat (p->name, &stat_buf[0])) {
>     if (verbose >= 3)
>       printf("stat failed on %s\n", p->name);
>     printf("DISK %s - ", _("CRITICAL"));
>     die (STATE_CRITICAL, _("%s %s: %s\n"), p->name, _("is not accessible"),
> strerror(errno));
>   }
> }
>
>
>
> On Fri, Mar 9, 2012 at 1:16 PM, Boyer, Timothy A. <Timothy.Boyer at opm.gov>
> wrote:
>
> It's Permissive, so that can't be it.  Thanks...
>
>
> -----Original Message-----
> From: Sigmund Brandstaetter [mailto:sb at maniladev.com]
> Sent: Thursday, March 08, 2012 4:12 PM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] check_disk '/sys not accessable'
>
> Tim,
>
> How about SELinux, is it maybe on only on the one that is making the
> problem?
>
> Cheers
> Sigmund
>
>
>
> On 3/9/2012 00:49, Boyer, Timothy A. wrote:
>> Nagios 3.3.1. Two identical RHEL6.1 systems, and all I'm trying to do
>> is get a total disk space reading. So nrpe is running on both, with
>> the identical command in nrpe.cfg:
>> command[check_all_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$
>> -c $ARG2$
>> command[check_all_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$
>> -c $ARG2$
>> Running as user nagios from the central server.
>> One works fine:
>> -sh-4.1$ /usr/lib/nagios/plugins/check_nrpe -H server1 -c
>> check_all_disk -a 20% 10%
>> 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%);
>> the other gives me this:
>> -sh-4.1$ /usr/lib/nagios/plugins/check_nrpe -H server2 -c
>> check_all_disk -a 20% 10%
>> DISK CRITICAL - /sys is not accessible: Permission denied
>> Identical versions of nrpe (2.12); a diff on check_disk shows they're
>> both identical; both commands work correctly locally run as user Nagios:
>> [nagios at server1 ~)$ /usr/lib/nagios/plugins/check_disk -w20% -c10%
>> 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%);
>> [nagios at server2 /]$ /usr/lib/nagios/plugins/check_disk -w20% -c10%
>> DISK OK - free space: / 22004 MB (77% inode=96%); /dev/shm 498 MB
>> (100% inode=99%); /boot 387 MB (84% inode=99%);
>> Multiple other nrpe commands running on both; this is the only thing
>> they're having problems with.
>> /sys is user-readable in both. Logs show nothing.
>
>> I've run out of ideas. Pointers in the right direction appreciated...
>
>> Tim
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Virtualization&  Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>>
>>
>> _______________________________________________
>> 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
>
>
> --
> ---------------------
> Sigmund Brandstaetter
> Check my Blog
> Live from Manila
> http://maniladev.com
> ---------------------
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> 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
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> 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
>
>
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> 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!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> 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

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
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!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
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
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
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!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
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