BigMemory 4.3.9 | Code Samples | Example: Nagios Integration
 
Example: Nagios Integration
Nagios plugins are standalone extensions to the Nagios monitoring tool. They allow Nagios to monitor external systems.
Plugins can be either executable scripts or compiled binaries, and they return certain codes that are then processed by Nagios to report the status of the monitored service.
The script included is an example of a Nagios plugin to check if a node.left event occurred.
A node.left event occurs when a node leaves the Terracotta cluster. For this example, we want to receive an alert in Nagios if a node is not available anymore.
The script tc-rest-plugin.sh is provided as an example of a Nagios plugin. The script is located in the code-samples/example08-nagios-integration area of your installed kit. The script takes three parameters as follows:
./tc-rest-plugin.sh <ServerName> <PortNumber> <Interval>
where <ServerName> is the name of the Terracotta server, <PortNumber> is the Terracotta server port (e.g. 9530) and <Interval> is the amount of time in minutes in the past to which the check applies (e.g. 10 will check in the last 10 minutes).
This plugin is installed in Nagios in the same way as for any standard plugin.