Few days ago, I finally motivate me to monitor my personal boxes. Since I known good Cacti (I use it for ~5 years now), I installed and configured the Net-SNMP provided by Solaris 10 (run /usr/sfw/bin/snmpconf or directly edit /etc/sma/snmp/snmpd.conf). And then, after add "disk" lines in snmpd.conf, I notice some values (like disk used, disk total) are defined to 0 :
snmpwalk -v2c -c xxxx katsuragi.global.asyd.net UCD-SNMP-MIB::dskTable
[..]
UCD-SNMP-MIB::dskPath.1 = STRING: /
UCD-SNMP-MIB::dskPath.2 = STRING: /home
UCD-SNMP-MIB::dskPath.3 = STRING: /data/pkgsrc
[..]
UCD-SNMP-MIB::dskDevice.1 = STRING: /dev/dsk/c1d0s0
UCD-SNMP-MIB::dskDevice.2 = STRING: data/home
UCD-SNMP-MIB::dskDevice.3 = STRING: data/pkgsrc
[..]
UCD-SNMP-MIB::dskTotal.1 = INTEGER: 1017935
UCD-SNMP-MIB::dskTotal.2 = INTEGER: 0
UCD-SNMP-MIB::dskTotal.3 = INTEGER: 0
[..]
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 755538
UCD-SNMP-MIB::dskAvail.2 = INTEGER: 0
UCD-SNMP-MIB::dskAvail.3 = INTEGER: 0
[..]
UCD-SNMP-MIB::dskPercent.1 = INTEGER: 21
UCD-SNMP-MIB::dskPercent.2 = INTEGER: 18
UCD-SNMP-MIB::dskPercent.3 = INTEGER: 5
As you can see, dskTotal and dskAvail values are set to 0 for zfs volumes, while the dskPercent value is correct, so I need to customize cacti to use the dskPercent value rather the other ones. Note the SNMP query file is already aware about dskPercent, I "just" create:
- a new data source in the "ucd/net Hard disk space" data template
- a new graph template
- add the graph template to the "ucd/net monitored partitions" data queries
I talk a bit with richlowe regarding this problem, and I need to check the net-snmp code, and make somes tries with statvfs too.
- asyd's blog
- Vous devez vous identifier ou créer un compte pour écrire des commentaires