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

extend {$VFS.DEV.DEVNAME.NOT_MATCHES} by other popular block device names

XMLWordPrintable

    • Sprint 60 (Jan 2020), Sprint 61 (Feb 2020), Sprint 62 (Mar 2020), Sprint 63 (Apr 2020), Sprint 64 (May 2020), Sprint 65 (Jun 2020)
    • 0.5

      In template "Template Module Linux network interfaces by Zabbix agent" we define a macro:

      {$VFS.DEV.DEVNAME.NOT_MATCHES}
      

      with value:

      ^(loop[0-9]*|sd[a-z][0-9]+|nbd[0-9]+|sr[0-9]+|fd[0-9]+|dm-[0-9]+|ram[0-9]+)
      

      As we can see, we try to filter out drive partitions for very/most popular block devices names, to monitor only block device itself.
      I.e. we discard "sda1" or "sdb3" etc.

      But there are other quite popular block device types, which use different names.
      For example on my laptop and on my raspberry, in /proc/diskstats I have these guys:

       259       0 nvme0n1 10312114 9299976 534402615 3252340 82680771 8871064 1149452592 14615935 0 11085704 4665484 306832 0 279376728 322061
       259       1 nvme0n1p1 618 819 18762 139 574 40036 452576 1712 0 1080 824 194 0 957864 275
       259       2 nvme0n1p2 7696674 3112144 463956141 2870628 9316512 6384389 544163440 9588810 0 9795684 3801176 306638 0 278418864 321785
       259       3 nvme0n1p3 58 0 4176 6 0 0 0 0 0 24 0 0 0 0 0
       259       4 nvme0n1p4 2614693 6187013 70420312 381552 73157933 2446639 604836576 4850083 0 1500872 857128 0 0 0 0
      
       179       0 mmcblk0 179483 56517 19174100 2641189 34909922 14393247 1409425746 1961046400 0 360529960 549897530 0 0 0 0
       179       1 mmcblk0p1 1540 2687 22846 2214 2 0 2 1081 0 2170 2760 0 0 0 0
       179       2 mmcblk0p2 123574 52846 8244954 1882736 34669657 14154154 1391564272 1931599076 0 357190900 544669130 0 0 0 0
       179       3 mmcblk0p3 37704 669 8122602 583517 120402 219920 6804728 12461545 0 2759620 3926380 0 0 0 0
       179       4 mmcblk0p4 16607 315 2780546 172547 119861 19173 11056744 16984697 0 2308300 3586070 0 0 0 0
      

      and I have all those partitions discovered too, while it's redundant.

      So, the macro should be extended to include at least these popular drive names.

      I'm not sure about naming pattern in case if I have several same type block devices (quite possible for nvme***), so maybe we could filter *out not by "start of line", but by "end of line".
      So I suggest this value for the macro:

      ^(loop[0-9]*|sd[a-z][0-9]+|nbd[0-9]+|sr[0-9]+|fd[0-9]+|dm-[0-9]+|ram[0-9]+)|(p[0-9]+)$
      

            tuskov Tikhon Uskov (Inactive)
            zalex_ua Oleksii Zagorskyi
            Team INT
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: