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:
timestamp: Process (1811) wrote 30894 rows
timestamp: Process (1854) wrote 45354 rows
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:
1st match: 30894
2nd match: 45354
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.
- duplicates
-
ZBXNEXT-1653 Add an agent item to extract matching part of regular expression from specified file
- Closed