README.txt Nagios-Core-Plugin To Monitor Primergy Servers ========================================================================= Version: 4.00.00 Author: Fsas Technologies. Usable For: Nagios Core V4 or higher This is usable for all Nagios Core V4 compatible systems shortened as "Nagios" in all subsequent texts. The tgz contains following directory structure: /usr/local/nagios/libexec/PRIMERGY/* In this directory are two sub-directories: - plugin - cfg Directory plugin: ----------------- Directory with perl scripts. DO NOT CHANGE THESE FILES. primergy_server.pl require Net::SNMP primergy_server_REST.pl requires curl (executable) discover_primergy_server.pl requires all above named scripts (... dependent on options) MONITORING SCRIPTS: The script with name 'check_primergy_server.pl' is a script to monitor PRIMERGY servers. This can be used as check plugin in Nagios environments or as standalone script. This plugin can monitor - PRIMERGY Servers - Monitor via iRMC address (Firmware Version 7.32 or higher) The script with name 'check_primergy_server_REST.pl' is a script to monitor PRIMERGY servers. This can be used as check plugin in Nagios environments or as standalone script. This plugin can monitor - PRIMERGY Servers - Monitor via iRMC address (Firmware Version 8.24 or higher) TOOL SCRIPTS: The tool scripts are tools to check the connection and the type of a server by testing the accesses (File name starts with tool_*). The discover script enables the check of connection with SNMP and REST and is able to generate Nagios-Core compatible host definition configuration files. This can be called for one address or multiple addresses (e.g. IPv4 ranges) (File name: discover_primergy_server.pl) The inventory script enables to get enhanced system information. The inventory data are data without status and performance values and might be called unscheduled. Following data are searched: - Enhanced system information - Information about network addresses - Firmware information - PRIMERGY information about running processes Directory cfg: -------------- Sample configuration files for Nagios systems. These may be copied or imported into your Nagios configuration files and directories. Installation for the usage: =========================== To install and configure the Nagios-Core-Plugin for Primergy Servers, follow these steps: 1. Extract the plugin archive: Extract the `PrimergyNagios.4.00.00.tgz` archive to the Nagios libexec directory. These scripts will be used as check plugins, typically referenced by `$USER1$` in your Nagios system. sudo tar -xvzf PrimergyNagios.4.00.00.tgz -C /usr/local/nagios/libexec/ 2. Ensure correct access rights: ATTENTION: Change access rights, user, and group assignments according to other plugins if necessary. 3. Add Configuration File Directory to Nagios: Specify the location of the PRIMERGY configuration files in your `nagios.cfg` file. Append the following line to `/usr/local/nagios/etc/nagios.cfg`: cfg_dir=/usr/local/nagios/libexec/PRIMERGY/cfg 4. Define Commands in Nagios: Add the necessary command definitions to your Nagios commands configuration file, typically `/usr/local/nagios/etc/commands.cfg`. Append the following definitions: define command { command_name check_primergy_server_REST command_line $USER1$/PRIMERGY/plugin/check_primergy_server_REST.pl -H $HOSTADDRESS$ $_HOSTSV_REST_OPTIONS$ $ARG1$ register 1 } define command { command_name check_primergy_server command_line $USER1$/PRIMERGY/plugin/check_primergy_server.pl -H $HOSTADDRESS$ $_HOSTSV_OPTIONS$ $ARG1$ register 1 } define command { command_name check_primergy command_line $USER1$/PRIMERGY/plugin/check_primergy_server.pl -H $HOSTADDRESS$ $_HOSTSV_OPTIONS$ $ARG1$ register 1 } 5. Restart Nagios Service: After making configuration changes, restart the Nagios service to apply them. systemctl restart nagios.service