[ZBX-16540] Template HOST-RESOURCES-MIB SNMPv2 should exclude special filesystems Created: 2019 Mar 29  Updated: 2024 Apr 10  Resolved: 2020 Jan 09

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: None
Fix Version/s: 4.0.15rc1, 4.0.16rc1, 4.4.4rc1, 5.0.0alpha1, 5.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Franky Van Liedekerke Assignee: Vitaly Zhuravlev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File zbx_export_templates.xml    
Issue Links:
Sub-task
part of ZBXNEXT-5493 Update "Template OS Windows SNMP temp... Closed
Team: Team INT
Sprint: Sprint 56 (Sep 2019), Sprint 55 (Aug 2019), Sprint 57 (Oct 2019), Sprint 58 (Nov 2019), Sprint 59 (Dec 2019), Sprint 60 (Jan 2020)
Story Points: 0.5

 Description   

The template "Template Module HOST-RESOURCES-MIB SNMPv2" filters on specific filesystem parameters, but fails to exclude /dev, /sys and /run. Many people are jumping through loopholes to fix this, and the setting "Storage devices for SNMP discovery" in the Administration section of "regular expressions" doesn't apply.

Adding an extra filter to the Storage discovery with:

macro={#SNMPVALUE}
does not match
regex=^(/dev|/sys|/run)

solves this (see this attachment: zbx_export_templates.xml )



 Comments   
Comment by Franky Van Liedekerke [ 2019 Apr 01 ]

I forgot to add: this exclude is for storage size info of course (where /dev, /sys, /run and maybe others are non-relevant).

One could argue about /dev/shm in case of shared memory partitions, but I believe that is more the exception and that should be monitored on its own.

Another option would be to only include all known file systems in the discovery (xfs, ext2/3/4, tmpfs, ...) but there are more and more of these (gfs2, glusterfs, ...) so that list should then be easily modifiable in a global manner.

Comment by Vitaly Zhuravlev [ 2019 Oct 24 ]

Hi, liedekef, template was redesigned, to allow such filter changes without changing the template itself. You now have {$VFS.FS.NAME.MATCHES} and {$VFS.FS.NAME.NOT_MATCHES} macros in LLD filters.

By overwriting these macros on host level or linked template level - you can tune filters to your needs.

 

P.S. Template OS Linux SNMPv2 was updated as well, but currently it is no longer linked to HOST RESOURCES Template. But it has the same macros used in LLD filters.

Comment by Aleksandrs Larionovs (Inactive) [ 2019 Nov 15 ]

Available in:

Comment by Vitaly Zhuravlev [ 2019 Dec 02 ]

With recent fixes available in

Generated at Fri May 02 03:24:18 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.