[ZBX-20026] vfs.dir.count key reach timeout while ls works fast. Created: 2021 Sep 29 Updated: 2022 Mar 30 Resolved: 2022 Mar 30 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Documentation (D) |
Affects Version/s: | 5.0.15 |
Fix Version/s: | 6.2 (plan) |
Type: | Documentation task | Priority: | Trivial |
Reporter: | Andrei Gushchin (Inactive) | Assignee: | Sergey Simonenko (Inactive) |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
||||
Story Points: | 0.1 |
Description |
Steps to reproduce: bash$ zabbix_agentd -t vfs.dir.count[/TEST,,,"file,dir",,0] vfs.dir.count[/TEST,,,file,dir,,0] [m|ZBX_NOTSUPPORTED] [Timeout while waiting for data.] Result:
Expected: bash$ time ls -al /TEST | wc -l 28 real 0m0.053s user 0m0.003s sys 0m0.005s |
Comments |
Comment by Sergey Simonenko (Inactive) [ 2021 Dec 22 ] |
Item key escaping for zabbix_agentd (or zabbix_get) in command-line is wrong here. "file" and "dir" get treated as separate parameters and as a result 5th parameter (maximum depth) is empty and assumed to be "-1 (default) - unlimited" (please see https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/zabbix_agent) (which of course would time out because of network filesystem performance). The proper use from command-line should be as below: $ zabbix_agentd -t vfs.dir.count[/mnt/test,,,\"file,dir\",,0] [u|83] Or: $ zabbix_agentd -t 'vfs.dir.count[/mnt/test,,,"file,dir",,0]' [u|83] Double quotes are considered by POSIX-defined shell implementations as a special character that is used to preserve literal value enclosed within them: You don't need that when creating items or trigger in Zabbix frontend though as this is only a shell restriction, not unique to Zabbix and is not related to Zabbix. The double quotes are not part of the item key unless escaped (they're trimmed by the shell otherwise). We will mention this in the relevant section of the documentation to avoid confusion. |
Comment by Sergey Simonenko (Inactive) [ 2021 Dec 23 ] |
Documentation updated: |