We have an application that writes to a log file "log.0". When log.0 reaches a configured number of lines, it is renamed to "log.1", and a new "log.0" is created. If there was already a log.1, it woudl be renamed to log.2, etc, etc.
This way, the app can keep N number of log files. (we usuallly keep 10 or 20). Note: I did not come up with this, it's a legacy application.
This being said, I would THINK that I could use the log[] function, since the log I wish to monitor is always "log.0". But I've been seeing posts elsewhere that say the logrt[] should be used because log[] could get confused when the log copy/switch happens.
The Zabbix documentation doesn't cover this sort of example.
As a follow-on question, is it advisable to set a polling interval of 3s for a log or logrt function? Our log is very busy, we may write hundreds of lines per second.
Another follow-on question: I know that I can have multiple log or logrt items on the same file. But are there any concerns with doing this? Performance?
Thanks in advance for any guidance.
-Tom
This way, the app can keep N number of log files. (we usuallly keep 10 or 20). Note: I did not come up with this, it's a legacy application.
This being said, I would THINK that I could use the log[] function, since the log I wish to monitor is always "log.0". But I've been seeing posts elsewhere that say the logrt[] should be used because log[] could get confused when the log copy/switch happens.
The Zabbix documentation doesn't cover this sort of example.
As a follow-on question, is it advisable to set a polling interval of 3s for a log or logrt function? Our log is very busy, we may write hundreds of lines per second.
Another follow-on question: I know that I can have multiple log or logrt items on the same file. But are there any concerns with doing this? Performance?
Thanks in advance for any guidance.
-Tom
Comment