This plugin can be used to:
Supported parameters are:
You need a mysql connector jar file in the same directory that this plugin is installed.
In the following example, we will check the connection to a mysql database. We will give a CRITICAL if the connection can't be established or if it requires more than 8 seconds. A WARNING will be returned if the connection requires something between 3 and 8 seconds.
<command name="check_mysql" plugin_name="CHECK_MYSQL"> <arg name="hostname" value="$ARG1$" /> <arg name="port" value="$ARG2$" /> <arg name="database" value="$ARG3$" /> <arg name="user" value="$ARG4$" /> <arg name="password" value="$ARG5$" /> <arg name="warning" value="$ARG6$" /> <arg name="critical" value="$ARG7$" /> </command>
check_mysql : CHECK_MYSQL --hostname $ARG1$ --port $ARG2$ --database $ARG3$ --user $ARG4$ --password $ARG5$ --warning $ARG6$ --critical $ARG7$
Any of the parameters ($ARG?$ macros) could be hardcoded inside the JNRPE configuration.
The following will check the connection to a mysql database
check_nrpe -n -H 127.0.0.1 -c check_mysql -a localhost 3306 database username password 3:8 8:
<command name="check_users" plugin_name="CHECK_MYSQL"> <arg name="check-slave" /> <arg name="hostname" value="$ARG1$" /> <arg name="port" value="$ARG2$" /> <arg name="database" value="$ARG3$" /> <arg name="user" value="$ARG4$" /> <arg name="password" value="$ARG5$" /> <arg name="warning" value="$ARG6$" /> <arg name="critical" value="$ARG7$" /> </command>