Windows IMAP Server (via NRPE)

Description

Monitors an IMAP Windows 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-imap.xml

  • Plugin script: check_nrpe, check_tcp, check_imap

  • 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.

  • IMAPS_Alive

  • check_tcp_imaps

  • $USER1$/check_tcp -H $HOSTADDRESS$ -p 993

Check for connect() TCP on port number 993 of $HOSTADDRESS$

  • IMAPS_Server

  • check_imaps!4!6

  • $USER1$/check_imap -t 60 -H $HOSTADDRESS$ -w "$ARG1$" -c "$ARG2$" -p 993 -S

Uses check_imap plugin with the --S (SSL) switch to connect to port 993 of $HOSTADDRESS$ and search for ‘[* OK]’ in the IMAP server output.

  • $ARG1$: Warning seconds, default warning threshold is a 4 second response time

  • $ARG2$: Critical seconds, default critical threshold is a 6 second response time

  • IMAP_Alive

  • check_tcp_imap

  • $USER1$/check_tcp -H $HOSTADDRESS$ -p 143

Check for connect() TCP on port number 143 of $HOSTADDRESS$

  • IMAP_Server

  • check_imap!3!4

  • $USER1$/check_imap -t 60 -H $HOSTADDRESS$ -w "$ARG1$" -c "$ARG2$"

Uses check_imap plugin to connect to port 143 of $HOSTADDRESS$ and search for ‘[* OK]’ in the IMAP server output.

  • $ARG1$: Warning seconds, default warning threshold is a 4 second response time

  • $ARG2$: Critical seconds, default critical threshold is a 6 second response time

  • nrpe_cpu

  • check_nrpe_cpu!80!90

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

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

  • ARG1$: Warning percentage, default warning threshold is 80% CPU usage

  • $ARG2$ - Critical percentage, default critical threshold is 90% CPU usage

  • nrpe_disk_C

  • check_nrpe_disk!C:!80!90

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

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

  • $ARG1$: Drive letter, default drive is set for C: disk

  • $ARG2$: Warning percentage, default warning threshold is 80% usage

  • $ARG3$: Critical percentage, default critical threshold is 90% usage

  • nrpe_mem

  • check_nrpe_mem!80!90

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

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

  • $ARG1$: Warning percentage, default warning threshold is greater than 80% of Memory usage

  • $ARG2$: Critical percentage, default critical threshold is greater than 90% of Memory usage

  • nrpe_process_Alerter

  • check_nrpe_process_Alerter

  • $USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -c "check_service2_vb" -a "$HOSTADDRESS$" "Alerter"

Where PROCESSNAME is equal to the name of a process which should be running on the NRPE host. Sometimes processes will have spaces in their names. In this case an underscore (_) is used in place of any spaces in the service name.Uses check_nrpe plugin to connect to NRPE on $HOSTADDRESS$ and execute the check_service2_vb command as defined in the nrpe.cfg.

  • OK if service is running

  • CRITICAL is service is stopped or not installed

  • nrpe_process_Eventlog

  • check_nrpe_process_Eventlog

  • $USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -c "check_service2_vb" -a "$HOSTADDRESS$" "Eventlog"


  • nrpe_process_IMAP4Svc

  • check_nrpe_process_IMAP4Svc

  • $USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -c "check_service2_vb" -a "$HOSTADDRESS$" "IMAP4Svc"


  • nrpe_process_MSDTC

  • check_nrpe_process_MSDTC

  • $USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -c "check_service2_vb" -a "$HOSTADDRESS$" "MSDTC"


  • nrpe_process_TermService

  • check_nrpe_process_TermService

  • $USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -c "check_service2_vb" -a "$HOSTADDRESS$" "TermService"


Related Resources