[ZBXNEXT-5056] Allow regex/wildcards for vfs.files.exists Created: 2019 Feb 19 Updated: 2023 May 11 |
|
Status: | Reopened |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Agent (G), Server (S), Templates (T) |
Affects Version/s: | 4.0.4 |
Fix Version/s: | None |
Type: | New Feature Request | Priority: | Major |
Reporter: | Hector Lopez | Assignee: | Zabbix Support Team |
Resolution: | Unresolved | Votes: | 4 |
Labels: | items, triggers | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
RHEL 6/7 64bit |
Issue Links: |
|
Description |
We are planning to migrate our current monitoring tool to zabbix but one major blocker is that Zabbix does not play well with wildcards using vfs.files.exists. A large number of our systems generate application logs where our current tool would monitor and report if found. It is actually a simple "search for anything .log or error-.log in path /this/path/to/logfile", which does not appear to work with Zabbix vfs.files.exists item. |
Comments |
Comment by Edgar Akhmetshin [ 2019 Feb 19 ] |
Hello Hector, Thank you for reporting the issue. You can use custom LLD rules to discover all files and add them to the monitoring. I found a similar case registered under ZBXNEXT-1699, so we will close this ticket and continue the discussion there. Feel free to follow the original case and vote for it. Regards, |
Comment by Glebs Ivanovskis [ 2019 Feb 19 ] |
If you don't need to dive into contents of these files, you can use vfs.dir.count[]. I think it should be sufficient for this use case. |
Comment by Hector Lopez [ 2019 Feb 25 ] |
Thank you everyone for your inputs! Will do more testing noting these inputs.
|
Comment by James Howe [ 2019 May 15 ] |
@edgar.akhmetshin |
Comment by Aleksandrs Petrovs-Gavrilovs [ 2022 May 10 ] |
Instead of having a vfs.file.exists for each one, perhaps an item like vfs.files.exists to combine this into one item check such as: vfs.files.exists[/path1/to/some.log, /path1/to/another.log, /path2/to/more.log, /path3/to/another2.log] Regardless of whether the list of filenames is a single string parameter (“name1,name2”) or the item just accepts multiple parameters with each as a separate file, it would help reduce the chances of an external script timing out. |