Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
monitoring:observium:check-raidcontroller-state [2025/02/07 12:27] – removed - external edit (Unknown date) 127.0.0.1monitoring:observium:check-raidcontroller-state [2025/02/07 12:27] (current) – ↷ Page name changed from monitoring:observium:check-hardware-raid-state to monitoring:observium:check-raidcontroller-state Zyzonix
Line 1: Line 1:
 +====== Check Raid-Controller state with Observium (LSI/Adaptec) ======
  
 +//Both methods have been tested on Debian.//
 +
 +To monitor a **RAID-Controller** (not the RAID-State) 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'': <code bash>ln -s /usr/lib/observium_agent/scripts-availabe/hdarray /usr/lib/observium_agent/scripts-availabe/.</code>
 +  - Restart the socket: <code bash>systemctl restart observium_agent.socket</code>
 +  - 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 to monitor the RAID-state (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'': <code bash>sudo usermod -aG ssh observium</code>
 +  - Edit the ''/etc/sudoers'' file and allow ''observium'' to execute ''check_raid'', therefore add the following lines: <code bash># Add permission for knecht (used by Observium) to execute check_raid
 +observium          ALL=    NOPASSWD: /usr/lib/nagios/plugins/check_raid </code>
 +  - Now allow password-less authentication by copying the SSH-keys from the observium machine to the remote machine: <code bash>ssh-copy-id -i .ssh/id_rsa.pub observium@<remote-ip></code>
 +  - 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'': <code bash>// 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</code>
 +  - Finally restart ''apache2''
 +  - Now add a probe in Observium's webinterface with the following values:
 +<WRAP 60%>
 +^ Config-Option    ^ Value                                                                                                ^
 +| Device           | Remote-Device                                                                                        |
 +| Probe Type       | ''check_by_ssh''                                                                                     |
 +| Description      | ''RAID | <hostname>''                                                                                |
 +| Extra arguments  | <code bash>-H <hostname> -l observium  -C '/usr/bin/sudo /usr/lib/nagios/plugins/check_raid'</code>  |
 +</WRAP>
 +
 +<callout type="warning" icon="true">**Check** ''/opt/observium/includes/definitions/entities/probes.inc.php'' **after each update to verify that ** ''check_by_ssh'' **is still enabled!**</callout>