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:

  1. Firstly install Observium's Agent by using this script: github.com/Zyzonix/attic - observium-agent-quick-install.sh
  2. 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.
  3. Enable hdarray:
    ln -s /usr/lib/observium_agent/scripts-availabe/hdarray /usr/lib/observium_agent/scripts-availabe/.
  4. Restart the socket:
    systemctl restart observium_agent.socket
  5. Finally add an Alert-Checker for Status with the following settings: Conditions: status_event noteuqals ok and associate it with Status entPhysicalClass equals controller

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:

  1. Firstly install monitoring-plugins-contrib on the remote machine and monitoring-plugins-basics on Observium.
  2. Then add a user called observium on the remote machine and add him to the group ssh:
    sudo usermod -aG ssh observium
  3. 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 
  4. 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@<remote-ip>
  5. 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
  6. Finally restart apache2
  7. 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 | <hostname>
Extra arguments
-H <hostname> -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!