Unix MySQL Server (via SSH)

Description

Monitors a MySQL database on a remote Unix system by using the SSH protocol for remote access. Please reference the SSH Monitoring document when using this profile. If you are communicating to a remote host that is behind a firewall, make sure the SSH port 22 is allowed to access the remote host.

Profile Package

This package includes the following files:

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

  • Plugin scripts (installed on the GroundWork server): check_by_ssh

  • Plugin scripts (installed on the remote monitored server): check_procs and check_mysql

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_mysql_engine

  • check_by_ssh_mysql_engine!root!d3v3l0p3r

  • $USER1$/check_by_ssh -H $HOSTADDRESS$ -t 60 -l "$USER17$" -C "$USER22$/check_mysql -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$"

Check connection status of remote MySQL server via SSH

  • $USER1$: Plugin directory

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

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

  • $ARG1$: Username for remote connection, default is root

  • $ARG2$: Password to authenticate connection, default is d3v3l0p3r

  • ssh_process_mysqld

  • check_by_ssh_process_args!15!30!mysqld

  • $USER1$/check_by_ssh -H $HOSTADDRESS$ -t 60 -l "$USER17$" -C "$USER22$/check_procs -w $ARG1$ -c $ARG2$ -a $ARG3$"

Checks all processes via SSH and generates WARNING or CRITICAL states if the specified metric is outside the required threshold ranges. The metric defaults to number of processes. Search filters can be applied to limit the processes to check.

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

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

  • $ARG1$: Warning processes threshold, default is 15

  • $ARG2$: Critical processes threshold, default is 30

  • $ARG3$: Only scan for processes with args that contain string, default mysqld

  • ssh_process_mysqld_safe

  • check_by_ssh_process_args!1!1!mysqld_safe

  • $USER1$/check_by_ssh -H $HOSTADDRESS$ -t 60 -l "$USER17$" -C "$USER22$/check_procs -w $ARG1$ -c $ARG2$ -a $ARG3$"

Checks all processes via SSH and generates WARNING or CRITICAL states if the specified metric is outside the required threshold ranges. The metric defaults to number of processes. Search filters can be applied to limit the processes to check.

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

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

  • $ARG1$: Warning processes threshold, default is 1

  • $ARG2$: Critical processes threshold, default is 1

  • $ARG3$: Only scan for processes with args that contain string, default mysqld_safe

Related Resources