[Nagiosplug-help] Problem with output of check_disk

Ton Voon ton.voon at altinity.com
Thu Nov 9 11:39:02 CET 2006


Joerg,

Can you please subscribe to the list so you don't keep being rejected.

I think there's two things going on here:

1. The web interface is showing a different output because, I think,  
you are not running check_disk remotely. All check commands run on  
the Nagios server. You need NRPE / check_by_ssh / some other  
mechanism to run check_disk on the monitored server.

2. The first set of output from head for /storage/media/video looks  
correct (bar a rounding error - not sure why that would be true).  
The /dev is completely wrong though. What OS are you using? Also, can  
you run df --version to see which version of coreutils you are on.

Ton

On 9 Nov 2006, at 07:58, Joerg Janes wrote:

> Dear all,
>
> I have researched a little more. I have compared the check_disk  
> from the following versions:
> 1.4.0
> 1.4.3
> 1.4.4
> head from today
> Therefore, I have writte the following script:
>
> echo
> df -h
> echo
> echo 1.40:
> ./check_disk.140 -u GB -w 20% -c 10% -p "/dev/hdc1"
> echo 1.43:
> ./check_disk.143 -u GB -w 20% -c 10% -p "/dev/hdc1"
> echo 1.44:
> ./check_disk.144 -u GB -w 20% -c 10% -p "/dev/hdc1"
> echo head:
> ./check_disk.head -u GB -w 20% -c 10% -p "/dev/hdc1"
> echo
> echo 1.40:
> ./check_disk.140 -u GB -w 20% -c 10% -p "/dev/hda3"
> echo 1.43:
> ./check_disk.143 -u GB -w 20% -c 10% -p "/dev/hda3"
> echo 1.44:
> ./check_disk.144 -u GB -w 20% -c 10% -p "/dev/hda3"
> echo head:
> ./check_disk.head -u GB -w 20% -c 10% -p "/dev/hda3"
> echo
>
>
> The output of the script is as follows:
>
> sauron:/usr/lib/nagios/plugins# ./check_disk.test
>
> Dateisystem          Größe Benut  Verf Ben% Eingehängt auf
> /dev/hda3              56G  1,2G   55G   3% /
> udev                   10M   72K   10M   1% /dev
> devshm                380M     0  380M   0% /dev/shm
> /dev/hda1             449M   55M  371M  13% /boot
> /dev/hdb1             116G   37G   79G  32% /storage
> /dev/hdc1             239G  108G  131G  46% /storage/media/video
> /dev/hdc2              60G   33M   60G   1% /backup
>
> 1.40:
> DISK OK - free space: /storage/media/video 131 GB (55%);| /storage/ 
> media/video=108GB;190;214;0;238
> 1.43:
> DISK OK - free space: /storage/media/video 131 GB (55% inode=nan 
> %);| /storage/media/video=108GB;190;214;-2147483648;238
> 1.44:
> DISK OK - free space: /storage/media/video 130 GB (54% inode=-);| / 
> storage/media/video=107GB;190;214;0;238
> head:
> DISK OK - free space: /storage/media/video 130 GB (54% inode=-);| / 
> storage/media/video=107GB;190;214;0;238
>
> 1.40:
> DISK OK - free space: / 54 GB (98%);| /=1GB;44;49;0;55
> 1.43:
> DISK OK - free space: / 54 GB (98% inode=nan%);| /=1GB; 
> 44;49;-2147483648;55
> 1.44:
> DISK OK - free space: /dev 0 GB (99% inode=98%);| /dev=0GB;0;0;0;0
> head:
> DISK OK - free space: /dev 0 GB (99% inode=98%);| /dev=0GB;0;0;0;0
>
> I have marked the part, which seems to be a liitle "strange".
>
> Current Situation, none of the check_disk commands shows the  
> correct status info in the web interface...
>
> Any ideas, how to debug/analyse further?
>
> Thanks in advance,
> Joerg
>
>
>
> Joerg Janes schrieb:
>> Hi Ton,
>>
>> but if I use the check_disk from 1.4.4, the output of nagios is  
>> not correct also:
>>
>> But if I call it from the commandline itself:
>> sauron:/usr/lib/nagios/plugins# ./check_disk -V
>> check_disk (nagios-plugins 1.4.4) 1.78
>> sauron:/usr/lib/nagios/plugins# ./check_disk -u GB -w 20% -c 10% - 
>> p "/dev/hdc1"
>> DISK OK - free space: /storage/media/video 127 GB (53% inode=-);| / 
>> storage/media/video=111GB;190;214;0;238
>>
>> The wrong line in the web interface:
>>
>> Disk Space 4
>> OK	2006-11-08 17:23:33	 0d 0h 50m 15s	1/4	DISK OK - free space: / 
>> storage/media/video 13348000600 GB (-179370% inode=-48%):
>>
>>
>> To be honest, I have tested the check_disk plugin from the  
>> following versions:
>> 1.4.0
>> 1.4.3
>> 1.4.4
>> head from today
>> All plugins have an different output in the webinterface - but if  
>> I call the plugin from the commandline, all seems to be correct?  
>> Do you have any ideas how to proceed with logging/debugging?
>>
>> Thanks in advance,
>> Joerg
>>
>>
>> Ton Voon schrieb:
>>> Hi!
>>>
>>> This was fixed in the plugins release 1.4.4.
>>>
>>> Ton
>>>
>>> On 8 Nov 2006, at 15:52, Joerg Janes wrote:
>>>
>>>> Hi folks,
>>>>
>>>> i'm new with nagios configuration and struggle with an error in  
>>>> the display of the disk usage in the web interface of nagios2. I  
>>>> want to display the disk usage of the localhost (sauron):
>>>>
>>>> The command definition:
>>>>     define command{
>>>>         command_name    check_disk_gb
>>>>         command_line    /usr/lib/nagios/plugins/check_disk -u GB  
>>>> -w $ARG1$ -c $ARG2$ -p $ARG3$
>>>>         }
>>>>
>>>> The service definition in the config file:
>>>>     define service{
>>>>             host_name                          sauron
>>>>             service_description             Disk Space 4
>>>>             check_command                   check_disk_gb!20%! 
>>>> 10%!"/dev/hdc1"
>>>>             use                             generic-service
>>>>     }
>>>>
>>>> The wrong line in the web interface:
>>>>     Disk Space 4    CRITICAL     2006-11-08 08:26:31     0d 19h  
>>>> 8m 1s     4/4     DISK CRITICAL - free space: /storage/media/ 
>>>> video 136298985198123397907742720000 GB (100% inode=105%):
>>>>
>>>> But if I call it from the commandline itself:
>>>>     sauron:/usr/lib/nagios/plugins# ./check_disk -u GB -w 20% -c  
>>>> 10% -p "/dev/hdc1"
>>>>     DISK OK - free space: /storage/media/video 127 GB (53%  
>>>> inode=nan%);| /storage/media/video=111GB;190;214;-2147483648;238
>>>>
>>>> Does anyone have an idea how to fix this output error? Ist ist a  
>>>> problem of parsing the status output of the plugin?
>>>>
>>>> Some infos about my linux and nagios version-
>>>>     sauron:/usr/lib/nagios/plugins# uname -a
>>>>     Linux sauron 2.6.17-2-k7 #1 SMP Wed Sep 13 17:18:46 UTC 2006  
>>>> i686 GNU/Linux
>>>>     sauron:/usr/lib/nagios/plugins# ./check_disk -V
>>>>     check_disk (nagios-plugins 1.4.3) 1.68
>>>>     sauron:/usr/lib/nagios/plugins# nagios2 --version
>>>>     Nagios 2.5
>>>> I use the testing branch of Debian, which is called etch.
>>>>
>>>> Thanks in advance,
>>>> Impesa
>>>>
>>>
>>>
>>>
>>> http://www.altinity.com
>>> T: +44 (0)870 787 9243
>>> F: +44 (0)845 280 1725
>>> Skype: tonvoon
>>>
>>>
>>
>> --------------------------------------------------------------------- 
>> ----
>> Using Tomcat but need to do more? Need to support web services,  
>> security?
>> Get stuff done quickly with pre-integrated technology to make your  
>> job easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
>> Geronimo
>> http://sel.as-us.falkag.net/sel? 
>> cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> 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
>>
>
>
>
> This message has been scanned for viruses by MailController.
>
> ---------------------------------------------------------------------- 
> ---
> Using Tomcat but need to do more? Need to support web services,  
> security?
> Get stuff done quickly with pre-integrated technology to make your  
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> Geronimo
> http://sel.as-us.falkag.net/sel? 
> cmd=lnk&kid=120709&bid=263057&dat=121642______________________________ 
> _________________
> 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



http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20061109/c9a17835/attachment.html>


More information about the Help mailing list