[Nagiosplug-help] Regarding check_disk
Nigel Prentice
nigelpr at paradise.net.nz
Sat Nov 29 10:15:01 CET 2008
Regarding check_diskTo find out where Nagios plugins are failing I always begin on the host showing the problem and work back to the Nagios server:
1. The plugin must execute locally (as user nagios to confirm permissions, access to resources etc)
nagios at Solaris9 $ /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
2. The nrpe must be configured correctly in nrpe.cfg
command[checkDisk1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
3. The check_nrpe must execute on the command line of the Nagios server (as user nagios)
nagios at Nagios-Svr $ /usr/local/nagios/libexec/check_nrpe -H Solaris9 -c checkDisk1
You need to post the actual results/configurations of these three steps for the plugin that is not working.
You may have exposed some sort of bug, but only if the failure is local i.e. step 1. above.
BTW the error message you are receiving occurs near the start of the check_disk plugin. check_disk validates the command line parameters, then (if you have specified one or more -p options) it ensures that the directories specified actually exist. If they don't then exit with critcial status and text "DISK CRITICAL: not found" with an attempt to print the partition or directory specified.
while (temp_list) {
if (! temp_list->best_match) {
die (STATE_CRITICAL, _("DISK %s: %s not found\n"), _("CRITICAL"), temp_list->name);
}
temp_list = temp_list->name_next;
}
----- Original Message -----
From: Pak, Dmitry (dmpa)
To: Nagios Plugin Help List
Sent: Saturday, 29 November 2008 8:59 p.m.
Subject: Re: [Nagiosplug-help] Regarding check_disk
Actually I did ran commands under root, until you've advised to su to Nagios user (completely forgot about it!).
Now I did all the checks logged as Nagios users, and I have same results - where it's working - it's working, others still don't.
Could it be somehow related to ssh or probably NIS configuration (since I do have Nagios user created in NIS)?
How does check_disk plugin work? Does it use "df" cmd or somewhat else?
Yours faithfully,
Dmitry Pak
/usr/bin/ - *NIX+Backup Team
------------------------------------------------------------------------------
From: Nigel Prentice [mailto:nigelpr at paradise.net.nz]
Sent: Saturday, November 29, 2008 12:43 PM
To: Nagios Plugin Help List
Subject: Re: [Nagiosplug-help] Regarding check_disk
I have read your original post again. It says:
>>>
When I'm trying to check some of the plugins locally (i.e. /usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /) it's working fine, without errors.
<solaris9_box>> /usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /
DISK OK - free space: / 851 MB (21% inode=86%);| /=3138MB;3627;3829;0;4031
<<<
But now you say it doesn't work locally:
>>>
On nagios-non-working box:
su - nagios
/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
DISK CRITICAL: / not found
<<<
This indicated a problem in the nrpe communications.
Now you say the problem is seen executing the plugin locally.
Also, when you use the -v option on check_disk, you had better be specifying the -w -c and -p options too!
----- Original Message -----
From: Pak, Dmitry (dmpa)
To: Nagios Plugin Help List
Sent: Saturday, 29 November 2008 8:12 p.m.
Subject: Re: [Nagiosplug-help] Regarding check_disk
OK, you do have a point in your words :)
Now, what results I've got:
On nagios-working Sol9 box:
su - nagios
/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
DISK OK - free space: / 7560 MB (75% inode=95%);| /=2419MB;8064;9072;0;10080
On nagios-non-working box:
su - nagios
/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
DISK CRITICAL: / not found
Now, what exactly is the point here?
If I'm trying to invoke [/usr/local/nagios/libexec/check_disk -v] it goes with: DISK UNKNOWN - free space:|
Yours faithfully,
Dmitry Pak
/usr/bin/ - *NIX+Backup Team
----------------------------------------------------------------------------
From: Nigel Prentice [mailto:nigelpr at paradise.net.nz]
Sent: Saturday, November 29, 2008 11:51 AM
To: Nagios Plugin Help List
Subject: Re: [Nagiosplug-help] Regarding check_disk
OK, so this may be still an error in the nrpe.cfg.
What is the configuration line in your nrpe.cfg on the <Solaris9_box>?
For example:
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
Try to cut and paste everything after the equals sign and execute it on the <solaris9_box> as user nagios. This verifies that all the parameters to the plugin are being supplied correctly.
Remember that any changes to nrpe.cfg requires a restart of the nrpe daemon.
----- Original Message -----
From: Pak, Dmitry (dmpa)
To: Nagios Plugin Help List
Sent: Saturday, 29 November 2008 7:02 p.m.
Subject: Re: [Nagiosplug-help] Regarding check_disk
Hi!
Thanks for reply.
I did all the checks from Nagios server and when I'm invoking this command:
/usr/local/nagios/libexec/check_nrpe -H <solaris9_box> -c check_disk (check_disk in this example is the check of the root slice)
I'm receiving this:
DISK CRITICAL: / not found
I already got 2 Solaris9 boxes with such an error, while others are ok.
Yours faithfully,
Dmitry Pak
/usr/bin/ - *NIX+Backup Team
--------------------------------------------------------------------------
From: Nigel Prentice [mailto:nigelpr at paradise.net.nz]
Sent: Saturday, November 29, 2008 2:59 AM
To: Nagios Plugin Help List
Subject: Re: [Nagiosplug-help] Regarding check_disk
If it works correctly on the monitored system (solaris9_box), then the next thing to verify is from the command line on the Nagios server (I assume you are not passing any parameters via check_nrpe) viz:
<nagios-svr> /usr/local/nagios/libexec/check_nrpe -H <solaris9_box> -c check_disk
This will verify that:
1) the communications are okay (probably in your case since other checks work), and
2) the nrpe.cfg is correct on the monitored system (solaris9_box).
----- Original Message -----
From: Pak, Dmitry (dmpa)
To: nagiosplug-help at lists.sourceforge.net
Sent: Friday, 28 November 2008 5:12 p.m.
Subject: [Nagiosplug-help] Regarding check_disk
Hi 2 All!
I got one question regarding check_disk plugin, it's work actually.
I have Solaris 9 box (SPARC) with compiled plugins (1.4.13) and NRPE daemon (2.12), done with SSL support. Monitoring host is RHEL4, working fine.
When I'm trying to check some of the plugins locally (i.e. /usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /) it's working fine, without errors.
<solaris9_box>> /usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /
DISK OK - free space: / 851 MB (21% inode=86%);| /=3138MB;3627;3829;0;4031
But when I'm doing it through monitoring host (via Nagios configuration) - it goes with "DISK CRITICAL: / not found".
While all others plugins - such as "CPU Load", "Current Users", "HTTP check" - are working OK.
It's not SSL shaking error, because I did all the checks, and other plugins working OK. But when I'm trying to check disk space - all faulty.
PS. I have a few other Solaris boxes (v9), with the same versions of plugins and NRPE, compiled the same way. And all working OK on them regardin disk space usage.
Yours faithfully,
Dmitry Pak
/usr/bin/ - *NIX+Backup Team
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
------------------------------------------------------------------------
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.11/1817 - Release Date: 11/28/2008 8:17 AM
--------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
--------------------------------------------------------------------------
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
--------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.11/1817 - Release Date: 11/28/2008 8:17 AM
----------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
----------------------------------------------------------------------------
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
----------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.11/1817 - Release Date: 11/28/2008 8:17 AM
------------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
------------------------------------------------------------------------------
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.11/1817 - Release Date: 11/28/2008 8:17 AM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20081129/83a932c3/attachment.html>
More information about the Help
mailing list