[ZBXNEXT-1489] Item that matches pattern in string and extracts a portion of the data using regex Created: 2012 Oct 29 Updated: 2013 May 07 Resolved: 2013 May 07 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Agent (G) |
Affects Version/s: | None |
Fix Version/s: | 2.1.0 |
Type: | Change Request | Priority: | Minor |
Reporter: | Kodai Terashima | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 0 |
Labels: | regexps | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
A new Item type called "vfs.file.regextract" that would allow you to match on a string and then extract and return only a portion of data from within that string would be very useful. Using as an example, the following log entries: It would be cool if you could create an Item like this: vfs.file.regextract[/logs/row-data.log,"wrote (\d+) rows", 1] would result in this data: Item definition: vfs.file.regextract[<path to file>, <regex pattern to match>, <number of lines to read>] Like with perl regex pattern matching and extraction, the parenthesis indicate the portion of data to extract. |
Comments |
Comment by richlv [ 2012 Oct 29 ] |
very similar to |
Comment by Oleksii Zagorskyi [ 2012 Oct 30 ] |
Another feature could help (I hope) to reach desired results - |
Comment by Kodai Terashima [ 2013 May 07 ] |
implemented under |