Software RAID monitoring in Zabbix

โ€”

by

in

To monitor software RAID in Zabbix 1.8 you need to make following changes in Zabbix:

in /etc/zabbix/zabbix-agent*.conf on client

add in the end of the file:
#CONTROLLO RAID
UserParameter=custom.mdstat,/bin/cat /proc/mdstat | grep -c _

You need to restart zabbix Agent
sudo service zabbix-agent restart

On the Zabbix server add to the Linux Template:

Items:
Host: Template_Linux
Description: MDStat
Type: Zabbix_agent
Key: custom.mdstat
Applications: Availability, Filesystem

Trigger:
Name: RAID on {HOSTNAME}
Expression: {Template_Linux:custom.mdstat.last(0)}>0

This is tested on Ubuntu servers with:
RAID 1 with 2 disks
RAID 5 with 4 and 6 disks
RAID 6 with 8 disks


Comments

4 responses to “Software RAID monitoring in Zabbix”

  1. incorporation Avatar
    incorporation

    Thanks for some quality points there. I am kind of new to online , so I printed this off to put in my file, any better way to go about keeping track of it then printing?

  2. Thanks for the detail.

    Just one correction however, your trigger will only trigger when there is more than one partition missing from the RAID set so if one partition is missing it would still be “OK”
    {Template_Linux:custom.mdstat.last(0)}>1
    This should be {Template_Linux:custom.mdstat.last(0)}>0 which means it would trigger when one or more partition is missing from the RAID set.

    While I am commenting ๐Ÿ˜‰ – on newer versions of Zabbix the exact config is a bit different.
    The trigger part in particular would need to be the following:
    Trigger:
    Name: RAID on {HOST.NAME}
    Expression: {Template OS Linux:custom.mdstat.last(0)}>0

    1. Thanks for you comment!
      I had change this in my running config but not here. (I double checked ๐Ÿ™‚ )

      (Post updated)

  3. Bernd Kammlott Avatar
    Bernd Kammlott

    you dont need to add a UserParameter, it is possible to use the vfs.file.regmatch agent function.

    https://www.zabbix.com/forum/showpost.php?p=91083&postcount=18

Leave a Reply

Your email address will not be published. Required fields are marked *