Windows MSSQL Server (via NRPE)

Description

Monitors a Microsoft SQL Server using Nagios Remote Plugin Executor (NRPE). NRPE is used by the Nagios server to communicate with the Windows server.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. 

Profile Package

This package includes the following files:

  • Profile definition: service-profile-nrpe-mssql.xml

  • Plugin script: check_nrpe

  • NRPE script (installed on the monitored Windows 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.

  • nrpe_mssql_buffer_cache_hits

  • check_nrpe_mssql_buffer_cache_hits!80!50

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

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

  • $ARG1$: Warning threshold, default is 80

  • $ARG2$: Critical threshold, default is 50

  • nrpe_mssql_deadlocks

  • check_nrpe_mssql_deadlocks!Name=_Total!50!100

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

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

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 50

  • $ARG3$: Critical threshold, default is 100

  • nrpe_mssql_full_scans

  • check_nrpe_mssql_full_scans!10!20

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

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

  • $ARG1$: Warning threshold, default is 10

  • $ARG2$: Critical threshold, default is 20

  • nrpe_mssql_lock_wait_time

  • check_nrpe_mssql_lock_wait_time!Name=_Total!1000!1500

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

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

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 1000

  • $ARG3$: Critical threshold, default is 1500

  • nrpe_mssql_lock_waits

  • check_nrpe_mssql_lock_waits!Name=_Total!4!6

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

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

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 4

  • $ARG3$: Critical threshold, default is 6

  • nrpe_mssql_log_growths

  • check_nrpe_mssql_log_growths!Name=_Total!5!8

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

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

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 5

  • $ARG3$: Critical threshold, default is 8

  • nrpe_mssql_log_used_db_master

  • check_nrpe_mssql_log_used!Name=master!30!40

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

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

  • $ARG1$: Database Instance, where INSTANCENAME is equal to the database instance name on the target host

  • $ARG2$: Warning threshold, default is 30

  • $ARG3$: Critical threshold, default is 40

  • nrpe_mssql_log_used_db_model

  • check_nrpe_mssql_log_used!Name=model!40!50

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

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

  • $ARG1$: Database Instance, where INSTANCENAME is equal to the database instance name on the target host

  • $ARG2$: Warning threshold, default is 40

  • $ARG3$: Critical threshold, default is 50

  • nrpe_mssql_log_used_db_msdb

  • check_nrpe_mssql_log_used!Name=msdb!40!50

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

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

  • $ARG1$: Database Instance, where INSTANCENAME is equal to the database instance name on the target host

  • $ARG2$: Warning threshold, default is 40

  • $ARG3$: Critical threshold, default is 50

  • nrpe_mssql_log_used_db_mssqlsystemresource

  • check_nrpe_mssql_log_used!Name=mssqlsystemresource!40!50

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

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

  • $ARG1$: Database Instance, where INSTANCENAME is equal to the database instance name on the target host

  • $ARG2$: Warning threshold, default is 40

  • $ARG3$: Critical threshold, default is 50

  • nrpe_mssql_log_used_db_tempdb

  • check_nrpe_mssql_log_used!Name=tempdb!40!50

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

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

  • $ARG1$: Database Instance, where INSTANCENAME is equal to the database instance name on the target host

  • $ARG2$: Warning threshold, default is 40

  • $ARG3$: Critical threshold, default is 50

  • nrpe_mssql_memory_grants_pending

  • check_nrpe_mssql_memory_grants_pending!1!5

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

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

  • $ARG1$: Warning threshold, default is 1

  • $ARG2$: Critical threshold, default is 5

  • nrpe_mssql_transactions

  • check_nrpe_mssql_transactions!Name=_Total!10!20

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

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

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 10

  • $ARG3$: Critical threshold, default is 20

  • nrpe_mssql_users

  • check_nrpe_mssql_users!1!5

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

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

  • $ARG1$: Database Instance, default is _Total

  • $ARG2$: Warning threshold, default is 1

  • $ARG3$: Critical threshold, default is 5

  • nrpe_service_DcomLaunch

  • check_nrpe_service!DcomLaunch

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

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

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

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

  • nrpe_service_Dfs

  • check_nrpe_service!Dfs

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

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

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

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

  • nrpe_service_msftesql

  • check_nrpe_service!msftesql

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

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

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

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

  • nrpe_service_MSSQLServerADHelper

  • check_nrpe_service!MSSQLServerADHelper

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

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

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

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

  • nrpe_service_SQLBrowser

  • check_nrpe_service!SQLBrowser

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

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

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

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

  • nrpe_service_SQLSERVERAGENT

  • check_nrpe_service!SQLSERVERAGENT

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

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

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

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

  • nrpe_service_W32Time

  • check_nrpe_service!W32Time

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

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

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

  • OK if service is running

  • CRITICAL is service is stopped

  • UNKNOWN is service is not installed

Related Resources