Nagios Log monitoring
Posted: Fri Aug 09, 2019 9:37 am
Hello Team,
We are currently monitoring custom logs on our Windows servers. We monitor the logs using check_log3 plugin. Below is an example for the same:
check_log = scripts\check_log3.exe -l "D:\\Oracle\\Middleware\\user_projects\\DataMan0\\diagnostics\\logs\\services\\HyS9aifWeb_DataMan0-syserr.txt" -p "com.hyperion.reporting.util.HyperionReportException: Error connecting to database connection NIPPERA3: EPMHFM-69052 : The system was unable to open the application" -s "c:\seek1" -c 1
We add above lines in our nsclient.ini file and we get the output. We are using NSCP-0.5.2.35-x64 version.
In above example, -p denotes the string that we want to check in the log file and for multiple strings, we use multiple -p option.
Now, we have a new requirement in which we have to monitor the below three lines:
**** info Fri Aug 09 00:37:21 BST 2019 1565307441491 /atg/commerce/catalog/custom/CatalogMaintenanceService Service Lock CatalogMaintenance released for service CatalogMaintenance.
**** info Fri Aug 09 00:37:21 BST 2019 1565307441522 /ricoh/webshop/commerce/catalog/CatalogMaintenanceServiceScheduler DataSource before switch : DataSourceB datasource after switch: DataSourceA
**** info Fri Aug 09 00:37:21 BST 2019 1565307441522 /ricoh/webshop/commerce/catalog/CatalogMaintenanceServiceScheduler Exiting with datasource : DataSourceA
Here, we want to receive the alert only if these three lines comes in the same order, time/date will be changed.
But, if any of these lines is not present, Nagios should not throw any alert.
In other words, we want to receive the alert only if these 3 lines comes in the same sequence.
Please let me know how we can achieve this using check_log3 plugin.
We are currently monitoring custom logs on our Windows servers. We monitor the logs using check_log3 plugin. Below is an example for the same:
check_log = scripts\check_log3.exe -l "D:\\Oracle\\Middleware\\user_projects\\DataMan0\\diagnostics\\logs\\services\\HyS9aifWeb_DataMan0-syserr.txt" -p "com.hyperion.reporting.util.HyperionReportException: Error connecting to database connection NIPPERA3: EPMHFM-69052 : The system was unable to open the application" -s "c:\seek1" -c 1
We add above lines in our nsclient.ini file and we get the output. We are using NSCP-0.5.2.35-x64 version.
In above example, -p denotes the string that we want to check in the log file and for multiple strings, we use multiple -p option.
Now, we have a new requirement in which we have to monitor the below three lines:
**** info Fri Aug 09 00:37:21 BST 2019 1565307441491 /atg/commerce/catalog/custom/CatalogMaintenanceService Service Lock CatalogMaintenance released for service CatalogMaintenance.
**** info Fri Aug 09 00:37:21 BST 2019 1565307441522 /ricoh/webshop/commerce/catalog/CatalogMaintenanceServiceScheduler DataSource before switch : DataSourceB datasource after switch: DataSourceA
**** info Fri Aug 09 00:37:21 BST 2019 1565307441522 /ricoh/webshop/commerce/catalog/CatalogMaintenanceServiceScheduler Exiting with datasource : DataSourceA
Here, we want to receive the alert only if these three lines comes in the same order, time/date will be changed.
But, if any of these lines is not present, Nagios should not throw any alert.
In other words, we want to receive the alert only if these 3 lines comes in the same sequence.
Please let me know how we can achieve this using check_log3 plugin.