With mycehckpoint, one may:
- Monitor a server, storing monitored date to same server, or
- Monitor one server, storing monitored data to another server.
In either case, the monitored server does not need to be local; the script can monitor/store to any remote server, via MySQL TCP/IP connections.
The second case, however, is more of an interest, as it solves the issue of monitoring nodes in replication topologies.
Say we have the following servers:
wallace, being the master node, is the writable node. gromit & shawn, being slave nodes, are read only.
Monitoring multiple hosts
mycheckpoint suggests that you have three distinct schemata, one per monitored host. You should then have the following three databases, for example:
All of the above must pre-exist, via CREATE DATABASE. The monitoring account must have all privileges on these databases.
Monitoring all three nodes is accomplished by monitoring them distinctly. But this can be done in various ways:
- mycheckpoint is executed on wallace only, leading to:
root@wallace# mycheckpoint --host=localhost --monitored-host=wallace --database=mycheckpoint_wallace root@wallace# mycheckpoint --host=localhost --monitored-host=gromit --database=mycheckpoint_gromit root@wallace# mycheckpoint --host=localhost --monitored-host=shawn --database=mycheckpoint_shawn
- mycheckpoint is installed and executed on the three hosts:
root@wallace# mycheckpoint --host=wallace --monitored-host=localhost --database=mycheckpoint_wallace root@gromit# mycheckpoint --host=wallace --monitored-host=localhost --database=mycheckpoint_gromit root@shawn# mycheckpoint --host=wallace --monitored-host=localhost --database=mycheckpoint_shawn
- mycheckpoint is installed and executed on an altogether different host.
And, of course, hybrid solutions are possible, as well. At any case, the host used is always the master node.
Which of the three options is best?
The first and third ones requires the least installations: you only need to have mycheckpoint installed on one host.
The first requires less servers since it utilizes the master node.
As of revision 72, mycheckpoint monitors Linux OS data: CPU, memory, load average, disk usage, swap activity. This only occurs when monitoring the local machine. This stands in favor of the second option.