What's the best way to monitor a single log file (e.g. /var/log/messages, but plenty of other non-default logs fit the same concept) for multiple patterns?
For example, if I need to monitor /var/log/messages for 20 different patterns, I could have a single Item with "log[/var/log/messages,"(pattern1|pattern2|...)]", but only if the entire key is 256 characters or less. Of course, the chances of fitting 20 regex's into that small a space are pretty much nil.
I could also create 20 different Items with "log[/var/log/messages,"(pattern1)"]" (and so on).
I could also create one Item with "log[/var/log/messages]", but that would cause Zabbix to store every line of /var/log/messages in the database. With a large number of systems, that seems like a bad idea.
If I create 20 different Items looking in the same file, does that cause the Zabbix agent to make 20 different connections to the file?
Is there any difference in these answers if the log file is a Windows event log?
We're using Zabbix 3.0 with Linux agents at 3.0.4 and Windows agents at 3.0.0.
Thanks.
Dan
For example, if I need to monitor /var/log/messages for 20 different patterns, I could have a single Item with "log[/var/log/messages,"(pattern1|pattern2|...)]", but only if the entire key is 256 characters or less. Of course, the chances of fitting 20 regex's into that small a space are pretty much nil.
I could also create 20 different Items with "log[/var/log/messages,"(pattern1)"]" (and so on).
I could also create one Item with "log[/var/log/messages]", but that would cause Zabbix to store every line of /var/log/messages in the database. With a large number of systems, that seems like a bad idea.
If I create 20 different Items looking in the same file, does that cause the Zabbix agent to make 20 different connections to the file?
Is there any difference in these answers if the log file is a Windows event log?
We're using Zabbix 3.0 with Linux agents at 3.0.4 and Windows agents at 3.0.0.
Thanks.
Dan
Comment