Hello Team,
We are using check_log3.pl script for all log monitoring.
We have a new request to monitor a certain string like "Error while provisioning" under an .xml log file. Can we monitor .xml logs via the same plugin or is there any other plugin that can help us here?
Regards,
Aditya Anand
.xml logfile monitoring
Re: .xml logfile monitoring
You should be able to. I added the pattern to a "test" xml file, and ran the plugin against it. During the first run, the plugin found the pattern. During the second run, the plugin showed "Found 0 lines" as there were no new lines found, matching the pattern. See below:
Code: Select all
[root@main-nagios-xi libexec]# ./check_log3.pl -l /tmp/test.xml -p "Error while provisioning"
WARNING: Found 1 lines (limit=1/0): <NAGIOS_PERFDATA>Error while provisioning</NAGIOS_PERFDATA>|lines=1
[root@main-nagios-xi libexec]# ./check_log3.pl -l /tmp/test.xml -p "Error while provisioning"
OK: Found 0 lines (limit=1/0): No matches found.|lines=0Be sure to check out our Knowledgebase for helpful articles and solutions!