UNIX Sendmail Server (via SSH)

Description

Monitors a Sendmail server. Mail services are monitored from the GroundWork server. Monitoring scripts are installed on the remote server and called from the GroundWork server using the SSH protocol.  Please reference the SSH Monitoring document when using this profile.

Profile Package

This package includes the following files:

  • Profile definition: service-profile-ssh-sendmail.xml

  • Plugin scripts (installed on the GroundWork server): check_imap, check_pop, check_smtp, and check_by_ssh

  • Plugin scripts (installed on the remote monitored server): check_procs, check_mailq

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.

  • ssh_mailq_sendmail

  • check_by_ssh_mailq_sendmail!5!10

  • $USER1$/check_by_ssh -H $HOSTADDRESS$ -t 60 -l "$USER17$" -C "sudo $USER22$/check_mailq -w $ARG1$ -c $ARG2$ -M sendmail"

Check for number of messages in sendmail queue.

  • $USER17$: Remote user name for SSH checks (e.g., nagios)

  • $USER22$: Remote host plugin subdirectory (e.g., libexec)

  • $ARG1$: Warning threshold in messages, default is 5 messages

  • $ARG2$: Critical threshold in messages, default is 10 messages

  • ssh_process_crond

  • check_by_ssh_process_crond

  • $USER1$/check_by_ssh -H $HOSTADDRESS$ -t 60 -l "$USER17$" -C "$USER22$/check_procs -c 1:1 -a crond"

Check for the number of crond processes running.

  • No arguments

  • ssh_process_sendmail_accept

  • check_by_ssh_process_sendmail_accept

  • $USER1$/check_by_ssh -H $HOSTADDRESS$ -t 60 -l "$USER17$" -C "$USER22$/check_procs -c 1:1 -a sendmail:\ accepting\ con"

Check for the number of sendmail 'accepting connection' processes running.

  • No arguments.

  • ssh_process_sendmail_qrunner

  • check_by_ssh_process_sendmail_qrunner

  • $USER1$/check_by_ssh -H $HOSTADDRESS$ -t 60 -l "$USER17$" -C "$USER22$/check_procs -c 1:1 -a sendmail:\ Queue\ runner"

Check for the number of sendmail 'queue runner' processes running.

  • No arguments.

  • ssh_process_xinetd

  • check_by_ssh_process_xinetd

  • $USER1$/check_by_ssh -H $HOSTADDRESS$ -t 60 -l "$USER17$" -C "$USER22$/check_procs -c 1:1 -a xinetd"

Extended Internet Service Daemon, super-server daemon, manages Internet-based connectivity.

  • $USER17$: Remote user name for SSH checks (e.g., nagios)

  • $USER22$: Remote host plugin subdirectory (e.g., libexec)

  • No arguments.

  • tcp_imap

  • check_imap!3!5

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

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

  • $ARG1$: Warning seconds, default is 3 second response time

  • $ARG2$: Critical seconds, default is 5 second response time

  • tcp_imaps

  • check_imaps!3!5

  • $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 is 3 second response time

  • $ARG2$: Critical seconds, default is 5 second response time

  • tcp_pop3

  • check_pop3

  • $USER1$/check_pop -H $HOSTADDRESS$

  • Uses check_pop plugin to connect to port 110 of $HOSTADDRESS$ and search for [+OK] in the beginning of the POP3 server output.

  • No arguments.

  • tcp_pop3s

  • check_pop3s!3!5

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

Uses check_pop plugin with the -S (SSL) switch to connect to port 995 of $HOSTADDRESS$ and searches for [+OK] in beginning of the POP3 server output.

  • $ARG1$: Warning seconds, default is 3 second response time

  • $ARG2$: Critical seconds, default is 5 second response time

  • tcp_smtp

  • check_smtp!3!5

  • $USER1$/check_smtp -H $HOSTADDRESS$ -w "$ARG1$" -c "$ARG2$"

Uses check_smtp plugin to connect to port 25 of $HOSTADDRESS$, sends "HELO servername" and searches for '250 .*' in the beginning of the SMTP server output.

  • $ARG1$: Warning seconds, default is 3 second response time

  • $ARG2$: Critical seconds, default is 5 second response time

  • tcp_smtp_sendmail

  • check_sendmail!3!5

  • $USER1$/check_smtp -H $HOSTADDRESS$ -w "$ARG1$" -c "$ARG2$" -C "ehlo groundworkopensource.com" -R "ENHANCEDSTATUSCODES" -f nagios@$HOSTADDRESS$

Check the response to a command to the SMTP server

  • $ARG1$: Warning response time threshold in seconds, default is 3

  • $ARG2$: Critical response time threshold in seconds, default is 5

  • -C: Command string issued to SMTP server

  • -R: Expected response string to the command from the SMTP server

  • -f: From address to use in MAIL command

Related Resources