Monitor Windows Logs with NSClient++
Posted: Mon Apr 20, 2020 1:35 pm
I am trying to monitor log files on some MSSQL servers. On the my Exchange server I am doing this successfully by using the check_nrpe command:
With the MSSQL servers the I am trying to monitor specifics other than just ID numbers.
I currently don't have the funding for Nagios Log server but didn't know the limitations if I wanted to stand this up. Unless there is a way I can do this with the NSClient++ and I just have the syntax screwed up. I know I will need to look at the log server option eventually as I am getting more request to monitor log values.
Is this something Nagios can do, monitor logs without log server? Not sure if it is the ' or the " that causing the problem but if I just run
I get values back but can't get my specific check.
Code: Select all
check_nrpe -s -H HOSTNAME -t 60 -c Check_Eventlog -a 'warning=count > 0' 'critical=count > 0' "filter=level = 2 AND log = 'Application' AND id in (2112,2112)" 'scan-range=-10m'- Any warnings or errors for a SQL Server event source (starting with MSSQL$) in the Application event log.
- Any errors in the System logs with an event source of "disk"
- Any audit failures with a description containing “Login failed for user” in the Application logs, excluding those coming from 10.10.10.2 or 10.10.10.5. NOTE, this only generates a notification if it fails 6 times (5 minute intervals) in a row.
- An error in the System logs with a description containing "Installation Failure: Windows failed to install the following update"
I currently don't have the funding for Nagios Log server but didn't know the limitations if I wanted to stand this up. Unless there is a way I can do this with the NSClient++ and I just have the syntax screwed up. I know I will need to look at the log server option eventually as I am getting more request to monitor log values.
Is this something Nagios can do, monitor logs without log server? Not sure if it is the ' or the " that causing the problem but if I just run
Code: Select all
./check_nrpe -H <host> -c check_eventlog -a show-all
OK: No entries found|'count'=0;0;5