v-zhuravlev / zbx-smartctl

Templates and scripts for monitoring disks health with Zabbix and smartmontools
https://share.zabbix.com/storage-devices/smartmontools/smart-monitoring-with-smartmontools-lld
GNU General Public License v3.0
245 stars 127 forks source link

Add cciss discovery #165

Open iprok opened 3 years ago

iprok commented 3 years ago

I added 'quick and dirty' support for discovering disks on servers with raid controller that uses cciss linux driver. Exact model of my controller is 'HP Smart Array E200i'. On these servers I have no /dev/sd , nor /dev/sg devices. All disk devices are in /dev/cciss directory and look like:

ls /dev/cciss 
c0d0  c0d0p1  c0d0p2  c0d0p5  c0d0p6

According to man smartctl, smart information should be got using smartctl -d cciss,N from them where N is disk number. But unfortunately I have no servers with more than one disk with such raid contoller that's why I was able to hardcode only one disk.

My suggestion is that the best way to discover all disk is parsing output of cciss_vol_status /dev/cciss/c0d0 -V (apt-get install cciss-vol-status in debian) but I can update the code only if I have output of it with more than 1 disk in the system.

v-zhuravlev commented 3 years ago

Hi, thanks for PR. I think we should then wait for some multidisk output, maybe somebody else can provide it. I believe it is better to merge universal rather than hardcoded.