mikaku / Monitorix

Monitorix is a free, open source, lightweight system monitoring tool.
https://www.monitorix.org
GNU General Public License v2.0
1.12k stars 167 forks source link

"Disk drive temperatures and health" graphs empty #93

Closed mgruben closed 9 years ago

mgruben commented 9 years ago

"forked" from issue 91.

In summary, I'm able to # hddtemp /dev/sda and to # smartctl -a /dev/sda and return Celsius temperatures for that SSD, but the Monitorix graph for Disk Drive Temperatures has only -nan values.

This time, however, -nan occurs regardless of whether with rrdtool branch 1.4 or branch 1.5.

Added copy of the disk.rrd log file to my host, http://76.209.20.97:9997/

mikaku commented 9 years ago

OK, after checking your log file I see the following lines right after starting Monitorix:

Mon May 18 07:08:17 2015 - Loaded main configuration file '/etc/monitorix/monitorix.conf'.
Use of uninitialized value in lc at /usr/lib/monitorix/disk.pm line 60.
Mon May 18 07:08:17 2015 - Initializing graphs.
Mon May 18 07:08:17 2015 - disk::disk_init: ERROR: invalid or inexistent device name '/dev/sdb'.
Mon May 18 07:08:17 2015 - disk::disk_init: 'accept_invalid_disk' option is not set.
Mon May 18 07:08:18 2015 - fs::fs_init: Unable to detect the device name of '/mnt/4TB'. I/O stats for this filesystem won't be shown in graph. If this is really a mount point then consider using <devmap> to map it manually to a device name.

Can you, please, paste the sections <disk> and <fs> from your configuration file? Thanks.

mgruben commented 9 years ago
# DISK graph
# -----------------------------------------------------------------------------
<disk>
        <list>
                0 = /dev/sda, /dev/sdb, /dev/sdc
        </list>
        <alerts>
                realloc_enabled = n
                realloc_timeintvl = 0
                realloc_threshold = 1
                realloc_script = /path/to/script.sh
                pendsect_enabled = n
                pendsect_timeintvl = 0
                pendsect_threshold = 1
                pendsect_script = /path/to/script.sh
        </alerts>
</disk>
...
# FS graph
# -----------------------------------------------------------------------------
<fs>
        <list>
                0 = /, /var, /boot, /home, swap, /mnt/4TB
        </list>
        <desc>
        </desc>
        <devmap>
        </devmap>
        rigid = 2, 0, 2, 0
        limit = 100, 1000, 100, 1000
        <alerts>
                rootfs_enabled = n
                rootfs_timeintvl = 3600
                rootfs_threshold = 100
                rootfs_script = /path/to/script.sh
        </alerts>
</fs>

On occasion I have one or more external hard drives plugged in, which become /dev/sdb and /dev/sdc respectively, and one of which is occasionally mounted to /mnt/4TB

mikaku commented 9 years ago

If you configure a device name that won't be permanent in the system, then you must set the option accept_invalid_disk to y in the configuration file.

Please, read the monitorix.conf(5) man page. Thanks.