Make sure you have the most recent version of cagent installed. The monitoring of hardware raids with storcli requires cagent version 1.2.6 or later. Cagent checks the health of your raid arrays on the startup of the agent and then every 30 minutes. The check interval of the agent does not apply to the frequency of raid status checks. The 30 minutes interval is hardcoded and cannot be changed. Checking large raid arrays too frequently stresses a system unnecessarily.
If you have the
storcli command line tool already installed, make sure it's recent enough. Json formatted output must be supported. Try
storcli64.exe /call show J If you don't get a json formatted output, please update
storecli executable is needed to fetch the health state of your raid. Due to license reasons, we cannot include the binary into our packages. You must download it manually.
cd /tmpwget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/1.23.02_StorCLI.zipunzip 1.23.02_StorCLI.zip# On Debian/Ubuntuunzip storcli_All_OS.zip storcli_All_OS/Ubuntu/storcli_1.23.02_all.debsudo dpkg -i storcli_All_OS/Ubuntu/storcli_1.23.02_all.deb# On CentOS/RedHatunzip storcli_All_OS.zip storcli_All_OS/Linux/storcli-1.23.02-1.noarch.rpmsudo rpm -i storcli_All_OS/Linux/storcli-1.23.02-1.noarch.rpm# Clean up, downloads are nolonger neededrm -rf 1.23.02_StorCLI.* storcli_All_OS*
Now you have
storcli installed in
Check if your controller is supported by executing
sudo /opt/MegaRAID/storcli/storcli64 /call show allYou should get a lot of information.
Only the root-user can connect the
storcli to the controller. Therefore
cagent needs sudo-permission because the agent is not running with root-rights. Create a file
cagent ALL= NOPASSWD: /opt/MegaRAID/storcli/storcli64 /call show all J
Test the sudo-rule
[email protected]:~# su - cagent -s /bin/bash[email protected]:/$ sudo /opt/MegaRAID/storcli/storcli64 /call show all Jexit
Now tell cagent it should use storcli. Open the file
/etc/cagent/cagent.conf with an editor and insert the following two lines
... snip[storcli]binary = '/opt/MegaRAID/storcli/storcli64'
Optionally you can test if everything works well together by executing
sudo cagent -r -o - |jq .measurements.modules
After having installed the
storcli.deb you might get warnings every time you execute apt, apt-get, aptitude or another command for the package management.
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 8525 package 'storcli': missing maintainer
To get rid of these warnings open the file
/var/lib/dpkg/status with an editor. Search for the block containing the storcli and append the missing line
...snipPackage: storcliStatus: install ok installedPriority: optionalSection: storcliInstalled-Size: 7000000Architecture: allVersion: 1.23.02Depends: bashDescription: Storage Command Line Tool, manages storage controllers.Maintainer: None...snap
Point your browser to the URL https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/1.23.02_StorCLI.zip and save the downloaded file
1.23.02_storCLI.zip somewhere. There is another ZIP Inside the ZIP. Extract both and search for the Windows folder and copy the file
storcli64.exe to a new folder, for example,
cmd.exe terminal with administrative rights. Type in
"C:\Program Files\storcli\storcli64.exe" /call show all If you get a lot of output and information about your controller, you have successfully installed all prerequisites.
Make sure you have at least version 1.2.6 of cagent installed. Use
cagent -version to test. You can always use
cagent -p to see all supported options and examples for the configuration file.
Open the file
C:\Program Files\cagent\cagent.conf with an editor and insert the following two lines
...snip[storcli]binary = "/opt/MegaRAID/storcli/storcli64"...snap