====== Check Hardware-Raid state with Observium (LSI/Adaptec) ====== //Both methods have been tested on Debian.// To monitor a Hardware-RAID-Controller with Observium the Observium-Agent can be used: - Firstly install Observium's Agent by using this script: [[https://github.com/Zyzonix/attic/blob/main/observium/observium-agent-quick-install.sh|github.com/Zyzonix/attic - observium-agent-quick-install.sh]] - Then verify that the correct software for the RAID-Controller in use is installed. LSI: ''MegaCLI64'' and Adaptec ''arcconf'' is required. Verify a correct working of the software, otherwise the agent's module ''hdarray'' will not work. - Enable ''hdarray'': ln -s /usr/lib/observium_agent/scripts-availabe/hdarray /usr/lib/observium_agent/scripts-availabe/. - Restart the socket: systemctl restart observium_agent.socket - Finally add an Alert-Checker for ''Status'' with the following settings: **Conditions:** ''status_event noteuqals ok'' and associate it with ''Status entPhysicalClass equals controller''{{:monitoring:observium:observium_alert-check_raid-controller.png?1000|}} ----- ==== Other Method (insecure/outdated)==== //To use this method the enterprise version of Observium is required!// **Structure of this method:** Observium uses the ''check_by_ssh'' plugin from Nagios to connect to the remote machine via SSH. A special user with limited access will then execute the ''check_raid''-Plugin (also from Nagios) on the remote machine and will then send back the output to Observium. An alert checker can then check the RAID-state. **Setup:** - Firstly install ''monitoring-plugins-contrib'' on the remote machine and ''monitoring-plugins-basics'' on Observium. - Then add a user called ''observium'' on the remote machine and add him to the group ''ssh'': sudo usermod -aG ssh observium - Edit the ''/etc/sudoers'' file and allow ''observium'' to execute ''check_raid'', therefore add the following lines: # Add permission for knecht (used by Observium) to execute check_raid observium ALL= NOPASSWD: /usr/lib/nagios/plugins/check_raid - Now allow password-less authentication by copying the SSH-keys from the observium machine to the remote machine: ssh-copy-id -i .ssh/id_rsa.pub observium@ - By default the ''check_by_ssh'' plugin is disabled for Observium. Enable it by adding the following lines to ''/opt/observium/includes/definitions/entities/probes.inc.php'': // Custom extension for remote checks $probe = 'check_by_ssh'; $config['probes'][$probe]['enable'] = 1; $config['probes'][$probe]['descr'] = 'Execute checks remotely via SSH'; // End of custom code - Finally restart ''apache2'' - Now add a probe in Observium's webinterface with the following values: ^ Config-Option ^ Value ^ | Device | Remote-Device | | Probe Type | ''check_by_ssh'' | | Description | ''RAID | '' | | Extra arguments | -H -l observium -C '/usr/bin/sudo /usr/lib/nagios/plugins/check_raid' | **Check** ''/opt/observium/includes/definitions/entities/probes.inc.php'' **after each update to verify that ** ''check_by_ssh'' **is still enabled!**