Discussion:
[Monitorix-general] Monitorix log - uninitialised values in fs.pm
c***@yahoo.co.uk
2015-03-10 08:35:35 UTC
Permalink
Hi I've recently installed monitorix on a test system and configured the
disk/fs parts, the graphs for the file system usage appear to be
displaying correctly however looking at the monitorix log file shows
there's an issue:

Use of uninitialized value $write_cnt in addition (+) at
/usr/lib/monitorix/fs.pm line 764.
Use of uninitialized value $write_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.
Use of uninitialized value $read_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.
Use of uninitialized value $write_cnt in addition (+) at
/usr/lib/monitorix/fs.pm line 764.
Use of uninitialized value $write_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.
Use of uninitialized value $read_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.
Use of uninitialized value $write_cnt in addition (+) at
/usr/lib/monitorix/fs.pm line 764.
Use of uninitialized value $write_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.
Use of uninitialized value $read_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.
Use of uninitialized value $write_cnt in addition (+) at
/usr/lib/monitorix/fs.pm line 764.
Use of uninitialized value $write_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.
Use of uninitialized value $read_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.
Use of uninitialized value $write_cnt in addition (+) at
/usr/lib/monitorix/fs.pm line 764.
Use of uninitialized value $write_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.
Use of uninitialized value $read_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.
Use of uninitialized value $write_cnt in addition (+) at
/usr/lib/monitorix/fs.pm line 764.
Use of uninitialized value $write_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.

The log file is full of lines detailing the same error.
The relevant section of the config file:
.....
<disk>
<list>
0 = /dev/sda1, /dev/mapper/centos-root,
/dev/mapper/centos-home, /dev/mapper/centos-var, /dev/mapper/centos-tmp
</list>

<fs>
<list>
0 = /, /boot, /var, /home, /tmp
</list>
<desc>
/ = Root Filesystem
/boot = Boot Vol
/home = Home Directory
/var = Logging Dir
/tmp = Temp Dir
</desc>
<devmap>
/ = /dev/mapper/centos-root
/boot = /dev/sda1
/var = /dev/mapper/centos-var
/home = /dev/mapper/centos-home
/tmp = /dev/mapper/centos-tmp
</devmap>

~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 8.2G 2.4G 5.9G 29% /
devtmpfs 913M 0 913M 0% /dev
tmpfs 921M 0 921M 0% /dev/shm
tmpfs 921M 12M 909M 2% /run
tmpfs 921M 0 921M 0% /sys/fs/cgroup
/dev/mapper/centos-var 20G 849M 19G 5% /var
/dev/mapper/centos-home 4.9G 33M 4.9G 1% /home
/dev/sda1 497M 174M 324M 35% /boot
/dev/mapper/centos-tmp 4.9G 33M 4.9G 1% /tmp

Cheers
--
***** Email confidentiality notice *****
This message is private and confidential. Any dissemination,
distribution, copying or use of this communication without prior
permission of the sender is strictly prohibited. If you have received
this message in error, please notify us immediately and remove it from
your system.
***************************************
Jordi Sanfeliu
2015-03-10 14:33:31 UTC
Permalink
Hi,
Post by c***@yahoo.co.uk
Hi I've recently installed monitorix on a test system and configured the
disk/fs parts, the graphs for the file system usage appear to be
displaying correctly however looking at the monitorix log file shows
Use of uninitialized value $write_cnt in addition (+) at
/usr/lib/monitorix/fs.pm line 764.
Use of uninitialized value $write_sec in addition (+) at
/usr/lib/monitorix/fs.pm line 765.
[...]

These error messages dosen't help much if you don't provide a complete
log since Monitorix was started.
Post by c***@yahoo.co.uk
The log file is full of lines detailing the same error.
.....
<disk>
<list>
0 = /dev/sda1, /dev/mapper/centos-root,
/dev/mapper/centos-home, /dev/mapper/centos-var, /dev/mapper/centos-tmp
</list>
The error messages are in 'fs.pm' so, the 'disk' is not relevant here.
Post by c***@yahoo.co.uk
<fs>
<list>
0 = /, /boot, /var, /home, /tmp
</list>
<desc>
/ = Root Filesystem
/boot = Boot Vol
/home = Home Directory
/var = Logging Dir
/tmp = Temp Dir
</desc>
<devmap>
/ = /dev/mapper/centos-root
/boot = /dev/sda1
/var = /dev/mapper/centos-var
/home = /dev/mapper/centos-home
/tmp = /dev/mapper/centos-tmp
</devmap>
~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 8.2G 2.4G 5.9G 29% /
devtmpfs 913M 0 913M 0% /dev
tmpfs 921M 0 921M 0% /dev/shm
tmpfs 921M 12M 909M 2% /run
tmpfs 921M 0 921M 0% /sys/fs/cgroup
/dev/mapper/centos-var 20G 849M 19G 5% /var
/dev/mapper/centos-home 4.9G 33M 4.9G 1% /home
/dev/sda1 497M 174M 324M 35% /boot
/dev/mapper/centos-tmp 4.9G 33M 4.9G 1% /tmp
Cheers
Why are you mapping each mount point in the <devmap> section? Are you
doing this because you noticed that Monitorix was unable to detect it
automatically?

Moreover, if the devices you have mapped are not in the file
'/proc/diskstats' you are preventing Monitorix to work properly.

Please, remove the lines inside the section <devmap>, restart Monitorix
and check the log file to see possible error messages during the
initialization.

Regards.
--
Jordi Sanfeliu
FIBRANET Network Services Provider
http://www.fibranet.cat
Loading...