-
Incident report
-
Resolution: Fixed
-
Major
-
1.6.5
-
None
-
zabbix-1.6.5 from ZABBIX SIA.
Linux 2.6 i386, Linux 2.6 x86_64
"system.swap.in" and "system.swap.out" cannot treat LVM device.
It returns ZBX_NOTSUPPORTED.
Actually, following command return ZBX_NOTSUPPORTED.
- zabbix_agentd -t system.swap.in[mapper/VolGroup00-LogVol01,count]
system.swap.in[mapper/VolGroup00-LogVol01,count] [m|ZBX_NOTSUPPORTED] - zabbix_agentd -t system.swap.in[mapper/VolGroup00-LogVol01,sectors]
system.swap.in[mapper/VolGroup00-LogVol01,sectors] [m|ZBX_NOTSUPPORTED] - zabbix_agentd -t system.swap.out[mapper/VolGroup00-LogVol01,count]
system.swap.out[mapper/VolGroup00-LogVol01,count] [m|ZBX_NOTSUPPORTED] - zabbix_agentd -t system.swap.out[mapper/VolGroup00-LogVol01,sectors]
system.swap.out[mapper/VolGroup00-LogVol01,sectors] [m|ZBX_NOTSUPPORTED]
Maybe it also returns ZBX_NOTSUPPORTED with other device-mapper devices.
This problem is due to following two reasons.
(1) swapdev in function SYSTEM_SWAP_IN() and SYSTEM_SWAP_OUT() are too short to treat LVM device. It has only 10 char length.
(2) Both "system.swap.in" and "system.swap.out" use function get_swap_stat() and get_swap_dev_stat().
Function get_swap_stat() uses /proc/swap and /proc/swap returns LVM device name in format like "/dev/mapper/VolGroup00-LogVol01".
Function get_swap_dev_stat() uses /proc/diskstats and /proc/diskstats returns LVM device name in format like "dm-1".
Each function matchs user inputed device name and device name which come from /proc/swap or /proc/diskstats.
As a result, any LVM devices are unmatched and zabbix returns ZBX_NOTSUPPORTED.