Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-1015

"system.swap.in" and "system.swap.out" cannot treat LVM device

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9.0 (alpha)
    • 1.6.5
    • Agent (G)
    • 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.

      1. zabbix_agentd -t system.swap.in[mapper/VolGroup00-LogVol01,count]
        system.swap.in[mapper/VolGroup00-LogVol01,count] [m|ZBX_NOTSUPPORTED]
      2. zabbix_agentd -t system.swap.in[mapper/VolGroup00-LogVol01,sectors]
        system.swap.in[mapper/VolGroup00-LogVol01,sectors] [m|ZBX_NOTSUPPORTED]
      3. zabbix_agentd -t system.swap.out[mapper/VolGroup00-LogVol01,count]
        system.swap.out[mapper/VolGroup00-LogVol01,count] [m|ZBX_NOTSUPPORTED]
      4. 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.

        1. zabbix-1.6.5-dm_swap-01.patch
          4 kB
          Takanori Suzuki
        2. zabbix-1.6.5-dm_swap-02.patch
          3 kB
          Takanori Suzuki

            sasha Alexander Vladishev
            tsuzuki Takanori Suzuki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: