UserParameter=custom_item,if exist c:\pat\to\output.log cat c:\pat\to\output.log | grep -e "content.*found" | tail -1
To use the last value use tail -1.To use first value use
head -1.Into zabbix server create item
custom_item with text value:
Details from log file {ITEM.LASTVALUE}
Formula
{servername:custom_item.regexp(content)}=1
Do not use quotes inside regex()!
No comments:
Post a Comment