# ----------------------------------------------------------------- # # Mssql calls. It use the check_mssql_health from # http://labs.consol.de/lang/en/nagios/check_mssql_health/ # # ----------------------------------------------------------------- # Look at http://labs.consol.de/nagios/check_mssql_health/ to get it # Don't forget to change $_HOSTMSSQLUSER$ and $_HOSTMSSQLPASSWORD$ in templates.cfg before you use this ;) define command { command_name check_mssql_connection command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_CONNECTION_CRIT$ --warning=$_HOSTMSSQL_CONNECTION_WARN$ --mode connection-time } define command { command_name check_mssql_connected_users command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_CONNECTED_USERS_CRIT$ --warning=$_HOSTMSSQL_CONNECTED_USERS_WARN$ --mode connected-users } define command { command_name check_mssql_cpu_busy command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_CPU_BUSY_CRIT$ --warning=$_HOSTMSSQL_CPU_BUSY_WARN$ --mode cpu-busy } define command { command_name check_mssql_io_busy command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_IO_BUSY_CRIT$ --warning=$_HOSTMSSQL_IO_BUSY_WARN$ --mode io-busy } define command { command_name check_mssql_full_scans command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_FULL_SCANS_CRIT$ --warning=$_HOSTMSSQL_FULL_SCANS_WARN$ --mode full-scans } define command { command_name check_mssql_transactions command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_TRANSACTIONS_CRIT$ --warning=$_HOSTMSSQL_TRANSACTIONS_WARN$ --mode transactions } define command { command_name check_mssql_batch_requests command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_BATCH_REQUESTS_CRIT$ --warning=$_HOSTMSSQL_BATCH_REQUESTS_WARN$ --mode batch-requests } define command { command_name check_mssql_latches_waits command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_LATCHES_WAITS_CRIT$ --warning=$_HOSTMSSQL_LATCHES_WAITS_WARN$ --mode latches-waits } define command { command_name check_mssql_latches_wait_time command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_LATCHES_WAIT_TIME_CRIT$ --warning=$_HOSTMSSQL_LATCHES_WAIT_TIME_WARN$ --mode latches-wait-time } define command { command_name check_mssql_locks_waits command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_LOCKS_WAITS_CRIT$ --warning=$_HOSTMSSQL_LOCKS_WAITS_WARN$ --mode locks-waits } define command { command_name check_mssql_locks_timeouts command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_LOCKS_TIMEOUTS_CRIT$ --warning=$_HOSTMSSQL_LOCKS_TIMEOUTS_WARN$ --mode locks-timeouts } define command { command_name check_mssql_locks_deadlocks command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_LOCKS_DEADLOCKS_CRIT$ --warning=$_HOSTMSSQL_LOCKS_DEADLOCKS_WARN$ --mode locks-deadlocks } define command { command_name check_mssql_sql_recompilations command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_SQL_RECOMPILATIONS_CRIT$ --warning=$_HOSTMSSQL_SQL_RECOMPILATIONS_WARN$ --mode sql-recompilations } define command { command_name check_mssql_sql_initcompilations command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_SQL_INITCOMPILATIONS_CRIT$ --warning=$_HOSTMSSQL_SQL_INITCOMPILATIONS_WARN$ --mode sql-initcompilations } define command { command_name check_mssql_total_server_memory command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_TOTAL_SERVER_MEMORY_CRIT$ --warning=$_HOSTMSSQL_TOTAL_SERVER_MEMORY_WARN$ --mode total-server-memory } define command { command_name check_mssql_mem_pool_data_buffer_hit_ratio command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_MEM_POOL_DATA_BUFFER_HIT_RATIO_CRIT$ --warning=$_HOSTMSSQL_MEM_POOL_DATA_BUFFER_HIT_RATIO_WARN$ --mode mem-pool-data-buffer-hit-ratio } define command { command_name check_mssql_lazy_writes command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_LAZY_WRITES_CRIT$ --warning=$_HOSTMSSQL_LAZY_WRITES_WARN$ --mode lazy-writes } define command { command_name check_mssql_page_life_expectancy command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_PAGE_LIFE_EXPECTANCY_CRIT$ --warning=$_HOSTMSSQL_PAGE_LIFE_EXPECTANCY_WARN$ --mode page-life-expectancy } define command { command_name check_mssql_free_list_stalls command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_FREE_LIST_STALLS_CRIT$ --warning=$_HOSTMSSQL_FREE_LIST_STALLS_WARN$ --mode free-list-stalls } define command { command_name check_mssql_checkpoint_pages command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_CHECKPOINT_PAGES_CRIT$ --warning=$_HOSTMSSQL_CHECKPOINT_PAGES_WARN$ --mode checkpoint-pages } define command { command_name check_mssql_database_free command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --mode database-free } define command { command_name check_mssql_database_backup_age command_line $PLUGINSDIR$/check_mssql_health --server $HOSTNAME$ --username "$_HOSTMSSQLUSER$" --password "$_HOSTMSSQLPASSWORD$" --critical=$_HOSTMSSQL_DATABASE_BACKUP_AGE_CRIT$ --warning=$_HOSTMSSQL_DATABASE_BACKUP_AGE_WARN$ --name="$_HOSTMSSQL_DATABASE_BACKUP_AGE_EXCLUDED$" --regex --mode database-backup-age }