Hi community helpers! You're beautiful, and fantastic people! (hope I'm not overdoing it, maybe just a little but then, that's just a little).
So I'm trying something. I have built a script that feeds a logfile every minute, for testing purposes.
Basically, it writes 3 types of lines:
[timestamp] - <Random Number> - INF - number is even
[timestamp] - <Random Number> - WRN - number is odd
[timestamp] - <Random Number> - ERR - number is a multiple of 3
So then I created an Item: log[/var/log/test_log_zbx.log]
It just feeds zabbix with the lines.
And then I tried creating 3 triggers, one for each kind of line:
High test-log-ERR {00_test_template_it1:log[/var/log/test_log_zbx.log].str(ERR,1)}=1 Enabled
Information test-log-INF {00_test_template_it1:log[/var/log/test_log_zbx.log].str(INF,1)}=1 Enabled
Warning test-log-WRN {00_test_template_it1:log[/var/log/test_log_zbx.log].str(ERR,1)}=1 Enabled
But then, I get this:
13 Feb 2015 14:55:23 ubt-nde test-log-INF Information 3m No -
13 Feb 2015 14:55:23 ubt-nde test-log-WRN Warning 3m No -
13 Feb 2015 14:55:23 ubt-nde test-log-ERR High 3m No -
All 3 of them are triggered simutaneously, when I know all of them can't happen at the same time.
What am I doing wrong there ?
Jean-Bernard
So I'm trying something. I have built a script that feeds a logfile every minute, for testing purposes.
Basically, it writes 3 types of lines:
[timestamp] - <Random Number> - INF - number is even
[timestamp] - <Random Number> - WRN - number is odd
[timestamp] - <Random Number> - ERR - number is a multiple of 3
So then I created an Item: log[/var/log/test_log_zbx.log]
It just feeds zabbix with the lines.
And then I tried creating 3 triggers, one for each kind of line:
High test-log-ERR {00_test_template_it1:log[/var/log/test_log_zbx.log].str(ERR,1)}=1 Enabled
Information test-log-INF {00_test_template_it1:log[/var/log/test_log_zbx.log].str(INF,1)}=1 Enabled
Warning test-log-WRN {00_test_template_it1:log[/var/log/test_log_zbx.log].str(ERR,1)}=1 Enabled
But then, I get this:
13 Feb 2015 14:55:23 ubt-nde test-log-INF Information 3m No -
13 Feb 2015 14:55:23 ubt-nde test-log-WRN Warning 3m No -
13 Feb 2015 14:55:23 ubt-nde test-log-ERR High 3m No -
All 3 of them are triggered simutaneously, when I know all of them can't happen at the same time.
What am I doing wrong there ?
Jean-Bernard
Comment