Unique log monitoring
Posted: Thu Mar 30, 2017 9:57 am
I have an application team that is using CSV files and a MS SQL 2016 database to write logs to. They have asked me if Nagios is able to monitor these and if the 5th column of the CSV contains Warn, Error, or Fatal a notification needs to be sent out to the appropriate notification group.
On the database side, they’re logging to MS SQL 2016. Specifically a digital_log_p database on SQLPROD_DIGITALLOG,4000 in the LOG_ENTRY table.
The LOG_ENTRY table has a “LOG_SRC_ID” column which signifies which application the log is for.
The LOG_ENV_ID column signifies the environment (Dev, Test, Stage, Prod).
The LOG_SVRTY_LEVEL_ID column signifies the severity of the alert.
They want a separate monitor for each application when an entry occurs that has a LOG_ENV_ID of 4 and a severity level of 4 or higher.
sql-prod-dgl-log-clic-dev-read
sql-prod-dgl-log-clic-test-read
sql-prod-dgl-log-clic-stg-read
sql-prod-dgl-log-clic-read
sql-prod-dgl-log-llic-dev-read
sql-prod-dgl-log-llic-test-read
sql-prod-dgl-log-llic-stg-read
sql-prod-dgl-log-llic-read
sql-prod-dgl-log-services-dev-read
sql-prod-dgl-log-services-test-read
sql-prod-dgl-log-services-stg-read
sql-prod-dgl-log-services-read
I do have the NSClient++ on the Windows server that the csv file log is getting written to but not sure how to put together a check to monitor the 5th column of the CSV and I've never done any database monitor of tables. Looking for some suggestions and advice.
Thanks!
On the database side, they’re logging to MS SQL 2016. Specifically a digital_log_p database on SQLPROD_DIGITALLOG,4000 in the LOG_ENTRY table.
The LOG_ENTRY table has a “LOG_SRC_ID” column which signifies which application the log is for.
The LOG_ENV_ID column signifies the environment (Dev, Test, Stage, Prod).
The LOG_SVRTY_LEVEL_ID column signifies the severity of the alert.
They want a separate monitor for each application when an entry occurs that has a LOG_ENV_ID of 4 and a severity level of 4 or higher.
sql-prod-dgl-log-clic-dev-read
sql-prod-dgl-log-clic-test-read
sql-prod-dgl-log-clic-stg-read
sql-prod-dgl-log-clic-read
sql-prod-dgl-log-llic-dev-read
sql-prod-dgl-log-llic-test-read
sql-prod-dgl-log-llic-stg-read
sql-prod-dgl-log-llic-read
sql-prod-dgl-log-services-dev-read
sql-prod-dgl-log-services-test-read
sql-prod-dgl-log-services-stg-read
sql-prod-dgl-log-services-read
I do have the NSClient++ on the Windows server that the csv file log is getting written to but not sure how to put together a check to monitor the 5th column of the CSV and I've never done any database monitor of tables. Looking for some suggestions and advice.
Thanks!