Hello Team,
As per customer requirement need to monitor significant database exceptions in the alert logs.
I identified one plugin and started working on it. Please find below link of Logfiles Plugin.
Link: https://labs.consol.de/nagios/check_log ... escription
I have run this plugin in Nagios and getting output is below attached sceenshot.
We have tried our best to work on it. But we are not able to understand how to make success this plugin in nagios. Please help me the process to work on this.
Note: SQL,Mysql,Oracle Server is running on windows server.
Monitoring MSSQL&MySQL&Oracle Server AlertLogs in Nagios
Monitoring MSSQL&MySQL&Oracle Server AlertLogs in Nagios
You do not have the required permissions to view the files attached to this post.
Re: Monitoring MSSQL&MySQL&Oracle Server AlertLogs in Nagios
That plugin is a perl script and to get it to run on a Windows System, you would have to install a Windows version of Perl to run it and some sort of agent on the Windows System to run the script.
For perl, you can use this.
http://strawberryperl.com/
And an Windows Agent, you can use the Nagios NCPA agent.
https://www.nagios.org/ncpa/
I did find a German version of some instructions to get the plugin installed on a Windows system.
https://labs.consol.de/nagios/check_log ... index.html
Once you get the check_logfiles to run, you would copy it to the following folder if you are using the NCPA agent.
C:\Program Files (x86)\Nagios\NCPA\plugins
Once the above is done, the following example is a command you would run on the Nagios server for that plugin.
It should check the C:\Files\file.log for the pattern of Error and generate an alert.
You would have to adjust the command as necessary for your needs.
See this for alternate ways to check log files.
https://support.nagios.com/kb/article/l ... s-787.html
For perl, you can use this.
http://strawberryperl.com/
And an Windows Agent, you can use the Nagios NCPA agent.
https://www.nagios.org/ncpa/
I did find a German version of some instructions to get the plugin installed on a Windows system.
https://labs.consol.de/nagios/check_log ... index.html
Once you get the check_logfiles to run, you would copy it to the following folder if you are using the NCPA agent.
C:\Program Files (x86)\Nagios\NCPA\plugins
Once the above is done, the following example is a command you would run on the Nagios server for that plugin.
It should check the C:\Files\file.log for the pattern of Error and generate an alert.
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H xxx.xxx.xxx.xxx -t ncpapassword -M 'plugins/check_log' -a '--logfile=C:\Files\file.log --criticalpattern 'Error'See this for alternate ways to check log files.
https://support.nagios.com/kb/article/l ... s-787.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitoring MSSQL&MySQL&Oracle Server AlertLogs in Nagios
Hello tgriep,
Thanks for your response.
we have done the configuration as suggested but after running the script or plugin we are getting below issue attached the screenshots. Please do needful.
Thanks for your response.
we have done the configuration as suggested but after running the script or plugin we are getting below issue attached the screenshots. Please do needful.
You do not have the required permissions to view the files attached to this post.
Re: Monitoring MSSQL&MySQL&Oracle Server AlertLogs in Nagios
You are missing a single quote at the end of the line so add a ' to the end of the argument section.
The -M option is not correct, it needs to be specified like this with the plugins/ directive.
Another thing, you have a secret setup with special characters, it needs single quotes as well.
Make sure I typed in everything correctly in the example.
The connection refused error could be a misconfiguration in the ncpa.cfg file on the Windows server.
Check this file
Under the [api] section, make sure the following is correct.
Any changes, restart the ncpa_passive service.
If you still have connection issues, look at this log file.
The -M option is not correct, it needs to be specified like this with the plugins/ directive.
Code: Select all
-M 'plugins/check_logfiles'Code: Select all
./check_ncpa.py -H 152.63.3.143 -t '$@to$!ke#ll' -M 'plugins/check_logfiles' -a '--logfile=E:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG --criticalpattern 'Error''The connection refused error could be a misconfiguration in the ncpa.cfg file on the Windows server.
Check this file
Code: Select all
C:\Program Files (x86)\Nagios\NCPA\etc\ncpa.cfgCode: Select all
community_string = $@to$!ke#llIf you still have connection issues, look at this log file.
Code: Select all
C:\Program Files (x86)\Nagios\NCPA\var\log/ncpa_listener.logBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitoring MSSQL&MySQL&Oracle Server AlertLogs in Nagios
Hi tgriep,
Thanks for your response.
I have tried as per your suggestions but we are facing one error. Please find attached screenshot.
Thanks for your response.
I have tried as per your suggestions but we are facing one error. Please find attached screenshot.
You do not have the required permissions to view the files attached to this post.
Re: Monitoring MSSQL&MySQL&Oracle Server AlertLogs in Nagios
The NCPA agent uses port 5693 for connections and not port 443 so make sure that port is allowed through the Windows Firewall.
If you still have issues, check the NCPA agent's log files in the following folder. Especially the ncpa_listener.log file for any errors.
If you still have issues, check the NCPA agent's log files in the following folder. Especially the ncpa_listener.log file for any errors.
Code: Select all
C:\Program Files (x86)\Nagios\NCPA\var\logBe sure to check out our Knowledgebase for helpful articles and solutions!