Windows MSSQL Server (via WMI)

Description

Monitors a Microsoft SQL Server using Windows Management Instrumentation (WMI). Nagios Remote Plugin Executor (NRPE) is used by the Nagios server to communicate with the WMI proxy server. This proxy server queries the monitored Windows server for measurements and status using WMI.

Additionally, you may want to refer to the WMI Monitoring documentation. This project consists of a collection of script monitors (.vbs for starters) that use the Microsoft .Net Framework and WMI to retrieve performance data from remote Windows hosts without the need for agents on the remote hosts.

The nrpe.cfg file on the Windows server maps commands issued by the GroundWork server to scripts in the c:\nrpe_nt directory. Commands issued by this profile are installed with this package. If new NRPE commands are added, this file must be modified. The WMI proxy server must be in the same domain as target monitored Windows server, and must have administrator rights.

Profile Package

This package includes the following files:

  • Profile definition: service_profile_wmi_MSSQL.xml

  • Plugin script (installed on the GroundWork server): check_nrpe

  • WMI script (installed on the WMI Proxy server): nrpe_nt.zip

Installation

GroundWork Monitor includes many monitoring profiles for a variety of devices, systems and applications. Some profiles are pre-imported on a new GroundWork installation and others are distributed with the product. The configuration tool is used to import updated profiles and profiles that require additional setup, services can also be imported, see Importing Profiles.

Services Configuration

For plugin details you can run the service help command from within the nagios container. For example: Get to the nagios container from the gw8 directory: docker-compose exec -u 1000 nagios bash, then to the libexec directory: cd /usr/local/nagios/libexec, and enter a service help command e.g., ./check_snmp --help to receive help content.

Service/Command Line/Plugin CommandCommand Parameters

This column lists the Service Definition name, Service Command name with arguments to be passed to the plugin, and the Plugin Command line which is the plugin script called by Nagios for the service.

Command parameters are in the configuration services section with the following names and default values.

  • wmi_mssql_buffer_cache_hits

  • check_wmi_mssql_buffer_cache_hits!80!50

  • $USER1$/check_nrpe -t 60 -H $USER21$ -c get_mssql_buf_cache_hit -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_mssql_buf_cache_hit command as defined in nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Warning threshold, default is 80

  • $ARG2$: Critical threshold, default is 50

  • wmi_mssql_deadlocks

  • check_wmi_mssql_deadlocks!Name=_Total!50!100

  • $USER1$/check_nrpe -t 60 -H $USER21$ -c get_mssql_deadlocks -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_mssql_deadlocks command as defined in nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 50

  • $ARG3$: Critical threshold, default is 100

  • wmi_mssql_full_scans

  • check_wmi_mssql_full_scans!10!20

  • $USER1$/check_nrpe -t 60 -H $USER21$ -c get_mssql_fullscans -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_mssql_fullscans command as defined in nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Warning threshold, default is 10

  • $ARG2$: Critical threshold, default is 20

  • wmi_mssql_lock_wait_time

  • check_wmi_mssql_lock_wait_time!Name=_Total!1000!1500

  • $USER1$/check_nrpe -t 60 -H $USER21$ -c get_mssql_lock_wait_time -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_mssql_lock_wait_time command as defined in nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 1000

  • $ARG3$: Critical threshold, default is 1500

  • wmi_mssql_lock_waits

  • check_wmi_mssql_lock_waits!Name=_Total!4!6

  • $USER1$/check_nrpe -t 60 -H $USER21$ -c get_mssql_lock_waits -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_mssql_lock_waits command as defined in nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 4

  • $ARG3$: Critical threshold, default is 6

  • wmi_mssql_log_growths

  • check_wmi_mssql_log_growths!Name=_Total!5!8

  • $USER1$/check_nrpe -t 60 -H $USER21$ -c get_mssql_log_growth -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_mssql_log_growth command as defined in nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 5

  • $ARG3$: Critical threshold, default is 8

  • wmi_mssql_log_used

  • check_wmi_mssql_log_used!Name=_Total!80!90

  • $USER1$/check_nrpe -t 60 -H $USER21$ -c get_mssql_log_used -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_mssql_log_used command as defined in nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 80

  • $ARG3$: Critical threshold, default is 90

  • wmi_mssql_memory_grants_pending

  • check_wmi_mssql_memory_grants_pending!1!5

  • $USER1$/check_nrpe -t 60 -H $USER21$ -c get_mssql_memgrantspending -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_mssql_memgrantspending command as defined in nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Warning threshold, default is 1

  • $ARG2$: Critical threshold, default is 5

  • wmi_mssql_transactions

  • check_wmi_mssql_transactions!Name=_Total!10!20

  • $USER1$/check_nrpe -t 60 -H $USER21$ -c get_mssql_transactions -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_mssql_transactions command as defined in nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 10

  • $ARG3$: Critical threshold, default is 20

  • wmi_mssql_users

  • check_wmi_mssql_users!1!5

  • $USER1$/check_nrpe -t 60 -H $USER21$ -c get_mssql_users -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_mssql_users command as defined in nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 1

  • $ARG3$: Critical threshold, default is 5

  • wmi_service_DcomLaunch

  • check_wmi_service!DcomLaunch

  • $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_service command as defined in the nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Service Name (not Display Name)

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

  • wmi_service_Dfs

  • check_wmi_service!Dfs

  • $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_service command as defined in the nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Service Name (not Display Name)

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

  • wmi_service_msftesql

  • check_wmi_service!msftesql

  • $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_service command as defined in the nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Service Name (not Display Name)

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

  • wmi_service_MSSQLServerADHelper

  • check_wmi_service!MSSQLServerADHelper

  • $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_service command as defined in the nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Service Name (not Display Name)

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

  • wmi_service_SQLBrowser

  • check_wmi_service!SQLBrowser

  • $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$"

Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_service command as defined in the nrpe.cfg against the host $HOSTADDRESS$.

  • $ARG1$: Service Name (not Display Name)

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

Related Resources