Xymon Mailing List Archive search

Error in parsing of filesystem usage when monitoring NFS mounts

5 messages in this thread

list Marcus Mundt · Thu, 26 Mar 2015 11:37:39 +0100 ·
Dear fellow xymon users,

I monitor filesystems on one of my xymon clients. This went really well until switching to NFS. I managed to list and monitor the NFS mount, but the parsing of the transmitted string for the disk usage seems to go wrong at some point:

Xymon says:
/BACKUP (172% used) has reached the PANIC level (95%)

But in reality, some lines below, it shows the correct value of 64%:
172.X.X.X:/Backup 26T 17T 9.3T 64% /BACKUP

I guess xymon parses the IP address of the NFS and takes this as the disk usage. Any hints on how to edit the parsing or other help on how to solve this would be highly appreciated.

Kind Regards,

i. A. Marcus Mundt

forsa
Gesellschaft für Sozialforschung
und statistische Analysen mbH
Schreiberhauer Straße 30
10317 Berlin
Telefon: (0 30) 6 28 82-0
Telefax: (0 30) 6 28 82-4 00
E-Mail:  user-06538dc2c526@xymon.invalid

AG Berlin-Charlottenburg HRB 80391
Geschäftsführer: Prof. Manfred Güllner
list Japheth Cleaver · Thu, 26 Mar 2015 14:02:00 -0700 ·
quoted from Marcus Mundt
On Thu, March 26, 2015 3:37 am, Marcus Mundt wrote:
Dear fellow xymon users,

I monitor filesystems on one of my xymon clients. This went really well
until switching to NFS. I managed to list and monitor the NFS mount, but
the parsing of the transmitted string for the disk usage seems to go wrong
at some point:

Xymon says:
/BACKUP (172% used) has reached the PANIC level (95%)

But in reality, some lines below, it shows the correct value of 64%:
172.X.X.X:/Backup 26T 17T 9.3T 64% /BACKUP

I guess xymon parses the IP address of the NFS and takes this as the disk
usage. Any hints on how to edit the parsing or other help on how to solve
this would be highly appreciated.
Marcus,

Can you provide the OS type you're running on, along with a copy of the
full '[df]' section that's coming back in the client report?

Also, which version are you running on the server?


Regards,

-jc
list Marcus Mundt · Mon, 30 Mar 2015 11:12:09 +0200 ·
Hello J. C.,

xymon client version 4.3.3 on openSUSE 13.1 (i586)

in /home/xymon/client/bin/xymonclient-linux.sh I edited the excludes to get the info on the NFS:
echo "[df]"
#EXCLUDES=`cat /proc/filesystems | grep nodev | awk '{print $2}' | xargs echo | sed -e     's! ! -x !g'`
EXCLUDES="sysfs -x rootfs -x bdev -x proc -x cgroup -x cpuset -x tmpfs -x devtmpfs -x d    ebugfs -x securityfs -x sockfs -x pipefs -x anon_inodefs -x devpts -x ramfs -x hugetlbf    s -x pstore -x mqueue -x autofs -x ncpfs -x binfmt_misc"
#df -Pl -x iso9660 -x $EXCLUDES | sed -e '/^[^  ][^     ]*$/{
# without "l" lists NAS_BACKUP_DAILY
df -hP -x iso9660 -x $EXCLUDES | sed -e '/^[^   ][^     ]*$/{
N
s/[     ]*\n[   ]*/ /
}'

This is the client data reported in the web GUI:
[df] Filesystem Size Used Avail Use% Mounted on 
/dev/sda1 15G 1.7G 12G 13% / 
/dev/sdc1 1.8T 1.3T 468G 74% /WD_BACKUP_WEEKLY 
/dev/sda2 21G 49M 20G 1% /home 
172.X.X.X:/volume1/Backup 26T 17T 9.0T 65% /NAS_BACKUP_DAILY 
/dev/sdb1 1.8T 962G 780G 56% /WD_BACKUP_MONTHLY

Xymon Server Version: 4.3.0-0.20101114.beta3

Thanks for any help! Found a similar entry in the Mailing List from 2008, but there is no solution provided as far as I can see.
http://lists.xymon.com/archive/2008-January/016885.html

All the best from Berlin,
Marcus
quoted from Marcus Mundt


forsa
Gesellschaft für Sozialforschung
und statistische Analysen mbH
Schreiberhauer Straße 30
10317 Berlin
Telefon: (0 30) 6 28 82-0
Telefax: (0 30) 6 28 82-4 00
E-Mail:  user-06538dc2c526@xymon.invalid

AG Berlin-Charlottenburg HRB 80391
Geschäftsführer: Prof. Manfred Güllner 
 
-----Ursprüngliche Nachricht-----
Von:J.C. Cleaver <user-87556346d4af@xymon.invalid>
Gesendet: Don 26 März 2015 22:02
An: Marcus Mundt <user-06538dc2c526@xymon.invalid>
CC: xymon at xymon.com
Betreff: Re: [Xymon] Error in parsing of filesystem usage when monitoring NFS mounts
quoted from Marcus Mundt

On Thu, March 26, 2015 3:37 am, Marcus Mundt wrote:
Dear fellow xymon users,

I monitor filesystems on one of my xymon clients. This went really well
until switching to NFS. I managed to list and monitor the NFS mount, but
the parsing of the transmitted string for the disk usage seems to go wrong
at some point:

Xymon says:
/BACKUP (172% used) has reached the PANIC level (95%)

But in reality, some lines below, it shows the correct value of 64%:
172.X.X.X:/Backup 26T 17T 9.3T 64% /BACKUP

I guess xymon parses the IP address of the NFS and takes this as the disk
usage. Any hints on how to edit the parsing or other help on how to solve
this would be highly appreciated.
Marcus,

Can you provide the OS type you're running on, along with a copy of the
full '[df]' section that's coming back in the client report?

Also, which version are you running on the server?


Regards,

-jc

list Jeremy Laidman · Mon, 30 Mar 2015 23:56:35 +1100 ·
quoted from Marcus Mundt
On 26 March 2015 at 21:37, Marcus Mundt <user-06538dc2c526@xymon.invalid> wrote:
I monitor filesystems on one of my xymon clients. This went really well
until switching to NFS. I managed to list and monitor the NFS mount, but
the parsing of the transmitted string for the disk usage seems to go wrong
at some point

I would think that NFS-mounted filesystems would be monitored on the server
that hosted them, rather than other servers that mount them.
quoted from Marcus Mundt
#df -Pl -x iso9660 -x $EXCLUDES | sed -e '/^[^  ][^     ]*$/{
# without "l" lists NAS_BACKUP_DAILY
df -hP -x iso9660 -x $EXCLUDES | sed -e '/^[^   ][^     ]*$/{
You've replaced "df -Pl" with "df -hP".  The "-h" changes the headers.
This is important because the [df] parser specifically looks for columns
with the titles "Available", "Capacity" and "Mounted" to work out what each
column is for.  By adding "-h" you instead get "Avail", "Use%" and
"Mounted".  I think when the column headers can't be found, the parser will
assume that the values are in position 1, hence the "172"
being interpreted as disk space usage.

Try changing "df -hP" to "df -P" and see if that works better.

J
list Marcus Mundt · Mon, 30 Mar 2015 15:11:09 +0200 ·
Try changing "df -hP" to "df -P" and see if that works better.
this works! thanks a lot! I just wanted to increase the human readability and didn't think of problems which could arise. 
M
 -----Ursprüngliche Nachricht-----
Von:Jeremy Laidman <user-71895fb2e44c@xymon.invalid>
Gesendet: Mon 30 März 2015 14:56
signature
An: Marcus Mundt <user-06538dc2c526@xymon.invalid>
CC: xymon at xymon.com
Betreff: Re: [Xymon] Error in parsing of filesystem usage when monitoring NFS mounts


quoted from Marcus Mundt
On 26 March 2015 at 21:37, Marcus Mundt <user-06538dc2c526@xymon.invalid <mailto:user-06538dc2c526@xymon.invalid>> wrote:
I monitor filesystems on one of my xymon clients. This went really well until switching to NFS. I managed to list and monitor the NFS mount, but the parsing of the transmitted string for the disk usage seems to go wrong at some point

I would think that NFS-mounted filesystems would be monitored on the server that hosted them, rather than other servers that mount them.
 #df -Pl -x iso9660 -x $EXCLUDES | sed -e /^[^  ][^     ]*$/{
# without "l" lists NAS_BACKUP_DAILY> df -hP -x iso9660 -x $EXCLUDES | sed -e /^[^   ][^     ]*$/{
Youve replaced "df -Pl" with "df -hP".  The "-h" changes the headers.  This is important because the [df] parser specifically looks for columns with the titles "Available", "Capacity" and "Mounted" to work out what each column is for.  By adding "-h" you instead get "Avail", "Use%" and "Mounted".  I think when the column headers cant be found, the parser will assume that the values are in position 1, hence the "172" being interpreted as disk space usage.

Try changing "df -hP" to "df -P" and see if that works better.

J