5.2.2.2. Nagios
Follow the steps outlined in this section to use the Nagios monitoring system to check the status of our services.
The Nagios plugin can be found on any Worker or Principal node at the following path:
/usr/share/opennac/healthcheck/integration/monitor_client.sh
This script is a versatile plugin that can be used with various monitoring software such as Icinga and PRTG Monitor.
Copy the
monitor_client.sh
file to the checks folder of your Nagios server.The following parameters are available for the executing the script:
-H|--host OPENNAC_SERVER openNAC server to connect by SNMP to retrieve service status
Default: localhost
-s|--service SERVICE_NAME service name to check (ex: BACKEND, DBREPLICATION or UDS)
Required
-o|--output-style OUTPUT_STYLE output format to send information.
Options available: PRTG NAGIOS
Default: NAGIOS
-c|--community COMMUNITY community string to connect by SNMP
Default: public
-p|--snmpget-path SNMPGET_PATH snmpget path
Default: /usr/bin/snmpget
-h|--help display this help and exit
To check the status of services such as BACKEND and RADIUS, execute the following commands:
[root@nagios]# sh monitor_client.sh -H 10.21.35.20 -s BACKEND
[root@nagios]# sh monitor_client.sh -H 10.21.35.20 -s RADIUS
The script will return a response message indicating the status of the specified service. Possible status results include OK, WARNING, or CRITICAL.