Nagios Doc Update
Nagios Doc Update
This commit is contained in:
parent
3efe5c6b57
commit
19fbbd717f
@ -19,7 +19,23 @@ Last Updated: 12th March 2015
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
# MaxScale Requirements
|
||||
# Introduction
|
||||
|
||||
Nagios® Core™ is an Open Source system and network monitoring application. It watches hosts and services that you specify, alerting you when things go bad and when they get better.
|
||||
Nagios plugins are compiled executables or scripts (Perl scripts, shell scripts, etc.) that can be run from a command line to check the status or a host or service. Nagios uses the results from plugins to determine the current status of hosts and services on your network.
|
||||
Nagios core executes a plugin whenever there is a need to check the status of a service or host.
|
||||
|
||||
While MaxScale resources and status can be monitored via CLI using maxadmin commands, Nagios Plugin provides an automated way for system administration and database administrators to monitor MaxScale. The diagram below provides view of how Nagios and MaxScale interact.
|
||||
|
||||
There are three nagios plugin scripts that MaxScale provides.
|
||||
check_maxscale_threads.pl: This command provides you the status of current running threads and events in the queue on MaxScale Server. The Performance data associated with this command current and historic wait time for threads and events
|
||||
check_maxscale_resources.pl: This command provides you status of various resources on MaxScale server. The Performance data associated provides details on respective resources.
|
||||
Current resources are: modules, services, listeners, servers, sessions, filters
|
||||
check_maxscale_monitor.pl: This command provides you status of the configured monitor modules on MaxScale server.
|
||||
|
||||
In order to use these scripts on your Nagios Server, you need to copy them from the MaxScale binary package or download them from source tree on github.
|
||||
|
||||
# MaxScale Nagios Plugin Requirements
|
||||
|
||||
MaxScale must be configured with 'maxscaled' protocol for the administration interface:
|
||||
|
||||
@ -39,9 +55,9 @@ Example of MaxScale.cnf file:
|
||||
|
||||
Assuming Nagios installed on a separated server and the plugins are in /usr/lib64/nagios/plugins and configuration files are in /etc/nagios:
|
||||
|
||||
* Copy ./nagios/plugins/check_maxscale_*.pl under /usr/lib64/nagios/plugins
|
||||
* Copy ./nagios/plugins/maxscale_commands.cfg and server1.cfg to /etc/nagios/objects/
|
||||
* Edit /etc/nagios/nagios.cfg
|
||||
* Copy MaxScale plugin scripts (./nagios/plugins/check_maxscale_*.pl) to /usr/lib64/nagios/plugins on Nagios Server
|
||||
* Copy New commands and server1 definition (./nagios/plugins/maxscale_commands.cfg, server1.cfg) to /etc/nagios/objects/ on Nagios Server
|
||||
* Edit /etc/nagios/nagios.cfg on Nagios Server
|
||||
|
||||
and add (just after localhost.cfg or commnads.cfg)
|
||||
|
||||
@ -54,9 +70,10 @@ and add (just after localhost.cfg or commnads.cfg)
|
||||
- default MaxScale AdminInterface port is 6603
|
||||
- default maxadmin executable path is /usr/local/skysql/maxscale/bin/maxadmin
|
||||
It can be changed by -m option
|
||||
- maxadmin executable could be copied from an existing maxscale setup (default location is /usr/local/skysql/maxscale/bin/maxadmin)
|
||||
- maxadmin executable could be copied from an existing maxscale installation (default location is /usr/local/skysql/maxscale/bin/maxadmin)
|
||||
|
||||
Example related to server1.cfg
|
||||
This example shows configuration that needs to be done on Nagios server in order to communicate to MaxScale server that is running on host server1.
|
||||
In this example we are using the check_maxscale_resource as the check command
|
||||
|
||||
#Check MaxScale sessions, on the remote machine.
|
||||
define service{
|
||||
@ -68,13 +85,12 @@ Example related to server1.cfg
|
||||
}
|
||||
|
||||
### Check new running monitors
|
||||
* Restart Nagios and check new monitors are running in Current Status -> Services
|
||||
* Look for any errors in /var/log/nagios/nagios.log or nagios.debug
|
||||
|
||||
* Restart Nagios and check new monitors are running in HTTP Interface "Current Status -> Services" on Nagios Server
|
||||
* Look for any errors in /var/log/nagios/nagios.log or nagios.debug on Nagios Server
|
||||
|
||||
# Nagios Plugin command line usage
|
||||
|
||||
./check_maxscale_threads.pl -h
|
||||
(1) ./check_maxscale_threads.pl -h
|
||||
|
||||
MaxScale monitor checker plugin for Nagios
|
||||
|
||||
@ -89,10 +105,41 @@ Example related to server1.cfg
|
||||
-p <pass> = password to use for <user> at <host>
|
||||
-m <maxadmin> = /path/to/maxadmin
|
||||
|
||||
(2) ./check_maxscale_resources.pl -h
|
||||
|
||||
MaxScale monitor checker plugin for Nagios
|
||||
|
||||
Usage: check_maxscale_resources.pl [-r <resource>] [-H <host>] [-P <port>] [-u <user>] [-p <pass>] [-m <maxadmin>] [-h]
|
||||
|
||||
Options:
|
||||
-r <resource> = modules|services|filters|listeners|servers|sessions
|
||||
-h = provide this usage message
|
||||
-H <host> = which host to connect to
|
||||
-P <port> = port to use
|
||||
-u <user> = username to connect as
|
||||
-p <pass> = password to use for <user> at <host>
|
||||
-m <maxadmin> = /path/to/maxadmin
|
||||
|
||||
(3) ./check_maxscale_monitor.pl -h
|
||||
|
||||
MaxScale monitor checker plugin for Nagios
|
||||
|
||||
Usage: check_maxscale_monitor.pl [-r <resource>] [-H <host>] [-P <port>] [-u <user>] [-p <pass>] [-m <maxadmin>] [-h]
|
||||
|
||||
Options:
|
||||
-r <resource> = monitors
|
||||
-h = provide this usage message
|
||||
-H <host> = which host to connect to
|
||||
-P <port> = port to use
|
||||
-u <user> = username to connect as
|
||||
-p <pass> = password to use for <user> at <host>
|
||||
-m <maxadmin> = /path/to/maxadmin
|
||||
|
||||
# Output description:
|
||||
|
||||
* services
|
||||
Example for 'services'
|
||||
|
||||
#./check_maxscale_resources.pl -r resources
|
||||
|
||||
OK: 7 services found | services1=RW_Router;readwritesplit;1;1 services2=RW_Split;readwritesplit;1;1 services3=Test Service;readconnroute;1;1 services4=Master Service;readconnroute;2;2 services5=Debug Service;debugcli;1;1 services6=CLI;cli;2;145 services7=MaxInfo;maxinfo;2;2
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user