WMI Windows

WMI Windows Profile

This profile monitors a Windows 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 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.

Services Configuration
  • Service - Definitions in Monarch are stored under this name.
  • Command Line - Service command name with arguments to be passed to the plugin.
  • Plugin Command Line - Plugin script called by Nagios for this Service.
  • Extended Info - The Extended Service Info definition, typically used for generating graphs.
    Command lines displayed below are intended to be single line commands.
    Service Command Line Plugin Command Line Extended Info
    wmi_cpu
    Checks the CPU load
    check_wmi_cpu!_Total!80,90
    Default WARNING threshold at 80%; CRITICAL threshold at 90%
    $USER1$/check_nrpe -t 60 -H "$USER21$" -c get_cpu -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" percent_graph
    wmi_disk_C
    Checks the disk storage (default is the C: drive)
    check_wmi_disk!C:!80,90
    Default WARNING threshold at 80%; CRITICAL threshold at 90%
    $USER1$/check_nrpe -t 60 -H $USER21$ -c get_disk -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" percent_graph
    wmi_disktransfers
    Checks the disk transfers
    check_wmi_disk_transfers!Name=_Total!10!20
    Default WARNING threshold at 10 transfers per second; CRITICAL threshold at 20 transfers per second
    $USER1$/check_nrpe -t 60 -H $USER21$ -c get_disktransfers -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$" percent_graph
    wmi_mem
    Checks the memory usage
    check_wmi_mem!_Total!80,90
    Default WARNING threshold at 80%; CRITICAL threshold at 90%
    $USER1$/check_nrpe -t 60 -H $USER21$ -c get_mem -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" percent_graph
    wmi_memory_pages
    Checks the number of memory pages swapped
    check_wmi_memory_pages!10!20
    Default WARNING threshold at 10; CRITICAL threshold at 20
    $USER1$/check_nrpe -t 60 -H $USER21$ -c get_swapping -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" percent_graph
    wmi_service_Alerter
    Checks other key Windows services
    check_wmi_service!Alerter
    OK if service is running; CRITICAL is service is stopped; UNKNOWN is service is not installed OK if service is running
    $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$" percent_graph
    wmi_service_Eventlog check_wmi_service!Eventlog $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$" percent_graph
    wmi_service_MSDTC check_wmi_service!MSDTC $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$" percent_graph
    wmi_service_TermService check_wmi_service!TermService $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$" percent_graph
    wmi_uptime check_wmi_uptime!1800!900 $USER1$/check_nrpe -t 60 -H "$USER21$" -c get_system_uptime -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$"
Profile Package

This package includes the following files:

Profile Definitions

  • service-profile-wmi-windows.xml
  • perfconfig-wmi-windows.xml

Plugins Scripts on the GroundWork Server

  • check_nrpe

NRPE Scripts on the WMI Proxy Server

  • nrpe_nt.zip

Performance Graphing Programs

  • percent_graph.cgi 
Installation

GroundWork Monitor includes many monitoring profiles for a variety of devices, systems and applications. Profiles already imported on a new GroundWork installation include Service Ping, SNMP Network, and SSH UNIX. The GroundWork Monitor Configuration tool is used to import updated Profiles and Profiles that require additional setup; the Profile XML file and its companion Performance Configuration definition file. Services can also be imported in addition to Service Profiles in the Profile Importer. The import process is documented under GROUNDWORK PROFILES > How to import profiles.

Implementation

This section contains detail settings used by this Profile. These parameters can be altered with the Configuration tool.

Command Parameters

Command parameters are in the Configuration Services section with the following names and default values.

wmi_cpu

  • Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_cpu command as defined in the nrpe.cfg against the host on $HOSTADDRESS$.
  • $ARG1$ - Name of CPU, default is _Total
  • $ARG2$ - Warning and critical percentage, default is 80,90

wmi_disk_C

  • Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_disk command as defined in the nrpe.cfg against the host on $HOSTADDRESS$.
  • $ARG1$ - Drive letter, default is C:
  • $ARG2$ - Warning and critical percentage, default is 80,90

wmi_disktransfers

  • Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_disktransfers command as defined in the nrpe.cfg against the host on $HOSTADDRESS$.
  • $ARG1$ - Physical disk, default is Name=_Total
  • $ARG2$ - Warning value (per second), default is 10
  • $ARG3$ - Critical value (per second), default is 20

wmi_mem

  • Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_mem command as defined in the nrpe.cfg against the host on $HOSTADDRESS$.
  • $ARG1$ - Memory type (RAM, PAGING, _Total), default is _Total
  • $ARG2$ - Warning and critical percentage, default is 80,90

wmi_memory_pages

  • Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_swapping command as defined in the nrpe.cfg against the host on $HOSTADDRESS$.
  • $ARG1$ - Warning value (pages per second), default is 10
  • $ARG2$ - Critical value (pages per second), default is 20

wmi_service

  • 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 on $HOSTADDRESS$.
  • $ARG1$ - Service Name (not Display Name!)
  • OK if service is running
  • CRITICAL is service is stopped.
  • UNKNOWN is service is not installed.
Performance Graphing Parameters

The following parameters are used to generate performance charts. These parameters are set using the Configuration>Performance tool in GroundWork Monitor.

wmi_cpu

  • Graphs percentage CPU utilization for a specified CPU.
  • Nagios service description must contain the string "wmi_cpu".

wmi_disk_C

  • Graphs disk C percentage utilization.
  • Nagios service description must contain the string "wmi_disk".

wmi_disktransfers

  • Graphs disk transfers per second for a specified disk.
  • Nagios service description must contain the string "wmi_disktransfers".

wmi_mem

  • Graphs percentage memory utilization for a specified memory type.
  • Nagios service description must contain the string "wmi_mem".

wmi_memory_pages

  • Graphs number of swaps per second.
  • Nagios service description must contain the string "wmi_mem".
Implementation Notes
  • 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. Go to the GroundWork Support Portal - GroundWork Connect at www.groundworkconnect.com and search for Installing GroundWork WMI NRPE.
  • The WMI proxy server must be in the same domain as target monitored Windows server, and must have administrator rights.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.