Xymon Mailing List Archive search

hobbit df disk issue

2 messages in this thread

list Joshua Krause · Fri, 4 Jan 2008 08:54:42 -0500 ·
I have posted this once before but haven't really gotten a response from
anyone on this question.  I am having an issue with hobbit's disk column
alarming on nfs mounts with ip's on linux boxes.  It look like it reads the
ip and sees it as one of the disk usage or available disk.  This is what
hobbit shows:

 
red /hd2 (172% used) has reached the PANIC level (95%)

 
Filesystem            Size  Used Avail Use% Mounted on

/dev/sda5              20G  1.7G   18G   9% /

/dev/sda1              99M   12M   83M  12% /boot

/dev/sda7              20G  129M   19G   1% /data

/dev/sda8              74G  129M   70G   1% /hd3

/dev/sda6              20G  1.1G   18G   6% /usr/local

172.31.130.29:/ifs/storage1   17T  132G   17T   1% /hd2

 
Here is my output from the hobbitclients-linux.sh:

 
echo "[df]"

df -Ph -x none -x tmpfs -x shmfs -x unknown -x iso9660 | sed -e '/^[^   ][^
]*$/{

N

s/[     ]*\n[   ]*/ /

}'

 
Now something that I have found that is pretty odd is I have a solaris box
that does an nfs mount and it shows it properly in it's disk:

 
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d0          20G   6.5G    13G    34%    /
swap                   9.1G    24K   9.1G     1%    /var/run
swap                   9.1G   272K   9.1G     1%    /tmp
/dev/md/dsk/d4          24G     9K    24G     1%    /data
/dev/md/dsk/d3          20G   1.5G    18G     8%    /usr/local
172.31.130.29:/ifs/storage1    16T   133G    16T     1%    /hd2

 
Here is my output from the hobbitclients-sunos.sh:

 
/bin/df -h |egrep -v "proc|fd|mnttab|objfs|ctfs|devices"

 
Which I changed from this:

 
echo "[df]"

# All of this because Solaris df cannot show multiple fs-types, or exclude
certain fs types.

FSTYPES=`/bin/df -n -l|awk '{print $3}'|egrep -v
"^proc|^fd|^mntfs|^ctfs|^devfs|^objfs|^nfs"|sort|uniq`

if test "$FSTYPES" = ""; then FSTYPES="ufs"; fi

set $FSTYPES

/bin/df -F $1 -k | grep -v " /var/run"

shift

while test "$1" != ""; do

  /bin/df -F $1 -k | grep -v " /var/run" | tail +2

  shift

done

 
The reason I did this is to get my size to show in MB instead of Kbytes.
But for some reason the solaris box doesn't show the nfs mount with the ip
as an alert.

 
Anyone have any insight on this and a fix being that I am not good with sed
and awk's and don't really know if that is my issue or not.

 
Thanks

Josh
list Tom Georgoulias · Fri, 04 Jan 2008 10:17:51 -0500 ·
quoted from Joshua Krause
Joshua Krause wrote:
I have posted this once before but haven’t really gotten a response from anyone on this question.  I am having an issue with hobbit’s disk column alarming on nfs mounts with ip’s on linux boxes.  It look like it reads the ip and sees it as one of the disk usage or available disk.
A simple workaround (although it might be viewed as dodging the question entirely ;)  is to exclude NFS file systems from the disk test all together, and just watch the disk usage of the NFS filesystem by monitoring the disk usage on the NFS server itself.  This also has the benefit of preventing the hobbit client from hanging during the disk test should the NFS server become unavailable or have issues.  Adding a "-l" switch to the df command will accomplish this.

On a somewhat unrelated note, I tried using the -h option for the disk test in my environment and found that it prevented hobbit from correctly sending alerts when filesystems were yellow or red.  I'm sure it was a parsing issue, but never took the time to create a patch for do_disk.c to correct it.

Tom