[ZBXNEXT-1653] Add an agent item to extract matching part of regular expression from specified file Created: 2013 Mar 08 Updated: 2020 Mar 16 Resolved: 2014 Mar 28 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Agent (G) |
Affects Version/s: | None |
Fix Version/s: | 2.1.0, 2.2.0 |
Type: | New Feature Request | Priority: | Trivial |
Reporter: | Andris Zeila | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | logmonitoring, regexps | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
The purpose of this item is to extract only the interesting value from target file instead of returning the whole line like vfs.file.regexp[] item. Detailed specifications http://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-1653 |
Comments |
Comment by Oleksii Zagorskyi [ 2013 Mar 09 ] |
Take into account please |
Comment by richlv [ 2013 Mar 12 ] |
looks like this will also solve : |
Comment by Andris Zeila [ 2013 Mar 15 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-1653 |
Comment by Andris Zeila [ 2013 Mar 15 ] |
(1) Documentation should be updated according to the specifications (http://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-1653) wiper item documentation updated. zalex_ua sorry, it's not very clear to me what:
mean ? Also I'd simplify (and modify) that text to:
and so on for other affected keys wiper yes. line number. Updated according to suggestion. wiper apparently CLOSED |
Comment by dimir [ 2013 Apr 08 ] |
Successfully tested. Please review my changes in r34880 and r34888. |
Comment by Andris Zeila [ 2013 Apr 09 ] |
Available in version pre-2.1.0 (trunk) r34892. |
Comment by Andris Zeila [ 2013 Apr 09 ] |
Could you please review the documentation changes (and updated if I've missed anything). martins-v It looks to me like adding examples here is necessary (in comment column for vfs.file.regexp, web.page.regexp, log, logrt) - the examples could show a fairly simple item key (with output specified) and then say what will be returned by Zabbix. Or the existing examples could be expanded/improved. zalex_ua Martins, also, this page https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/log_items also contains some examples. I think you could estimate where it could be better to store examples, I don't like the fact that two different pages have examples (different ones, btw). I'd remove examples from the page I mentioned and just would leave them on a keys list page only, existing internal link there is enough. martins-v OK, I've moved all the existing log/logrt examples into the agent item list. wiper ideally every key would have own page with detailed description. Such pages could be better formatted and much easier to maintain. I'll try adding more examples to the table, will see if it's readable. martins-v I've reworked the descriptions for 'vfs.file.regexp' a bit at https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/zabbix_agent. The idea is to make things as easy to understand for the users as possible. |
Comment by dimir [ 2013 Apr 09 ] |
I'm sure this deserves a blog post. This is the big thing, first time in Zabbix a regex substitution is introduced. zalex_ua I'd say more - it requires a blog post <richlv> http://blog.zabbix.com/zabbix-2-2-features-part-7-value-extracting-from-logfiles-and-more/ |
Comment by richlv [ 2013 May 07 ] |
(2) whatsnew is missing all info about these changes martins-v For review: https://www.zabbix.com/documentation/2.2/manual/introduction/whatsnew220#ability_to_extract_matching_part_of_a_regular_expression wiper Looks good, though I'm not sure it's worth listing vfs.file.regmatch[] along with the other keys, as it does not have the output parameter (only start/end line parameters were added). Maybe it should be just mentioned at the end as related change (similarly it was done with EOF returning changes). martins-v vfs.file.regmatch[] is now split out as a related change. wiper great, CLOSED |
Comment by Alexander Vladishev [ 2013 Nov 05 ] |
(3) ChangeLog entry is missed wiper RESOLVED in r39918 |
Comment by Oleksii Zagorskyi [ 2014 Mar 28 ] |
I believe this is an issue which should be fixed. zalex_ua sorry, wrong issue number, closed again |