[Nagiosplug-help] check_disk, FreeBSD 5.3 and gmirror

Mohanty, Amitabh (Corporate, consultant) amitabh.mohanty at corporate.ge.com
Mon Feb 14 08:12:20 CET 2005


Hi,
 You can add the following in your snmp.conf file (/etc/snmp/snmp/conf)

disk /apps <threshold>% then restart snmp.

and then use the following in Nagios

check_snmp_disk!<community_name>

It would alert you when the files goes below the threshold value.

Thanks,
Amitabh

-----Original Message-----
From: nagiosplug-help-admin at lists.sourceforge.net
[mailto:nagiosplug-help-admin at lists.sourceforge.net]On Behalf Of Ben
O'Hara
Sent: Monday, February 14, 2005 10:26 AM
To: nagiosplug-help at lists.sourceforge.net
Subject: [Nagiosplug-help] check_disk, FreeBSD 5.3 and gmirror


Hi Guys,
            Bit of a strange problem here, wondering if anyone can help!

Ive just installed 2 new FreeBSD 5.3 machines and used gmirror to
software raid 2 disks together.

When ive added a check_disk check into nagios im getting back some
strange results!

>From the box

doc-store02# df -lkhi
Filesystem            Size    Used   Avail Capacity iused    ifree
%iused  Mounted on
/dev/mirror/gm0s1a    248M     35M    193M    15%     984    32038    3%   /
devfs                 1.0K    1.0K      0B   100%       0        0  100%   /dev
/dev/mirror/gm0s1g    127G    9.9G    107G     8% 1453640 15809974    8%   /apps
/dev/mirror/gm0s1e    989M    390K    910M     0%       9   141301    0%   /tmp
/dev/mirror/gm0s1f    1.9G    155M    1.6G     9%    9934   272688    4%   /usr
/dev/mirror/gm0s1d    989M    6.9M    903M     1%     144   141166    0%   /var

Now im only really interested in /apps (at least thats where im seeing
the problem)

df reports it as being 8% used, however when using check_disk i get
the following back

doc-store02# ./libexec/check_disk -v
DISK OK - free space: / 193 MB (78%); /dev 0 MB (0%); /apps 109881 MB
(84%); /tmp 910 MB (92%); /usr 1665 MB (84%); /var 903 MB (91%);|
/=54MB;247;247;0;247 /dev=0MB;0;0;0;0
/apps=20542MB;130423;130423;0;130423 /tmp=80MB;989;989;0;989
/usr=314MB;1978;1978;0;1978 /var=86MB;989;989;0;989

Above you can see that check_disk has reported it as being 16% used,
exactly twice the usage as it really has.

Im assuming its related to using gmirror and the way in which
check_disk gathers its values to make its calculation? Any chance its
getting the used space from both disks and adding it together?

Ben


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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




More information about the Help mailing list