-
Problem report
-
Resolution: Fixed
-
Major
-
5.0.27, 6.0.8, 6.2.2
-
None
-
Sprint 92 (Sep 2022), Sprint 93 (Oct 2022), Sprint 94 (Nov 2022)
-
1
As per upcoming changes in vfs.fs.get and vfs.fs.discovery (ZBXNEXT-1616 Agent supported vfs mount status on discovered mounts. - ZABBIX SUPPORT) we need to adapt OS templates accordingly.
For that we need to check if the options field exists in a value returned by the vfs.fs.get key in overrides to exclude some filesystems from discovery.
If you want to check whether a LLD macro exists and also check it against some regex, the existence check has to be placed at the beginning of the calculation formula.
Here's an example:
Calculation type: And
A. {#FSOPTIONS} exists
B. {#FSOPTIONS} matches (?:^|,)bind\b
This should also work with previous agent versions which don't have the options field, that's why we check for macro existence. If you use built-in And, it works fine. But if you try to use a custom formula and specify the exact same expression (A and B), it will show an error: "Cannot accurately apply filter: no value received for macro "{#FSOPTIONS}".
I think that custom formulas should work the same way as with built-in logical operators. Also, the macro existence check should be prioritized in filters and overrides, no matter where it was placed in formula, and only then they should be tested against regex.
I've attached the new "Linux filesystems by Zabbix agent" template (you can test it against Zabbix agent versions 6.2 and earlier).
- causes
-
ZBX-22000 Discovery failure after Zabbix 6 upgrade
- Closed