Just want to share how to monitor disks and controllers statuses because I spent 3 days on solving it.
RAID-5 configured in PERC6i and there is no data about it in an iDRAC or in installed TrueNAS.
Steps are:
On the TrueNAS web-interface create a user zabbix with uid 122 and password zabbix, and a group zabbix with uid 122. Then in a shell:
1) /usr/local/etc/pkg/repos/FreeBSD.conf put enabled:yes
2) /usr/local/etc/pkg/repos/local.conf put enabled:no
3) #pkg update
#pkg serach zabbix
#pkg install your_zabbix_agent_version
In my case (TrueNAS 13.1) it was neccesary to upgrade also pkg and some dependencies, because current version in a FreeBSD repository was 13.3
Make changes in a /usr/local/etc/zabbix6/zabbix_agentd.conf (put zabbix-server address) and put this user parameters:
UserParameter=raid.mfiutil,sudo /usr/sbin/mfiutil show volumes | fgrep RAID | fgrep -vc OPTIMAL
UserParameter=raid.mfiutil.battery.present,sudo /usr/sbin/mfiutil show adapter | fgrep 'Battery Backup' | grep -vc present
UserParameter=raid.mfiutil.battery.status,sudo /usr/sbin/mfiutil show battery | fgrep Status | fgrep -vc normal
Then
#visudo
and put:
%zabbix ALL=(ALL) NOPASSWD:/usr/sbin/mfiutil show volumes,/usr/sbin/mfiutil show adapter,/usr/sbin/mfiutil show battery
close visudo and
#ln -s /usr/local/bin/sudo /usr/bin/sudo
#sysrc zabbix_agentd_enable=YES
#service zabbix_agentd restart
On a zabbix server create a host, link "Template OS FreeBSD​" template and create 3 new items: "Faulty RAID-volumes" with a key raid.mfiutil, "RAID-controllers without batteries" with a key raid.mfiutil.battery.present and "Faulty RAID batteries" with a key raid.mfiutil.battery.status
Then create triggers like
last(/TrueNAS R710 agent/raid.mfiutil)>0
​
RAID-5 configured in PERC6i and there is no data about it in an iDRAC or in installed TrueNAS.
Steps are:
On the TrueNAS web-interface create a user zabbix with uid 122 and password zabbix, and a group zabbix with uid 122. Then in a shell:
1) /usr/local/etc/pkg/repos/FreeBSD.conf put enabled:yes
2) /usr/local/etc/pkg/repos/local.conf put enabled:no
3) #pkg update
#pkg serach zabbix
#pkg install your_zabbix_agent_version
In my case (TrueNAS 13.1) it was neccesary to upgrade also pkg and some dependencies, because current version in a FreeBSD repository was 13.3
Make changes in a /usr/local/etc/zabbix6/zabbix_agentd.conf (put zabbix-server address) and put this user parameters:
UserParameter=raid.mfiutil,sudo /usr/sbin/mfiutil show volumes | fgrep RAID | fgrep -vc OPTIMAL
UserParameter=raid.mfiutil.battery.present,sudo /usr/sbin/mfiutil show adapter | fgrep 'Battery Backup' | grep -vc present
UserParameter=raid.mfiutil.battery.status,sudo /usr/sbin/mfiutil show battery | fgrep Status | fgrep -vc normal
Then
#visudo
and put:
%zabbix ALL=(ALL) NOPASSWD:/usr/sbin/mfiutil show volumes,/usr/sbin/mfiutil show adapter,/usr/sbin/mfiutil show battery
close visudo and
#ln -s /usr/local/bin/sudo /usr/bin/sudo
#sysrc zabbix_agentd_enable=YES
#service zabbix_agentd restart
On a zabbix server create a host, link "Template OS FreeBSD​" template and create 3 new items: "Faulty RAID-volumes" with a key raid.mfiutil, "RAID-controllers without batteries" with a key raid.mfiutil.battery.present and "Faulty RAID batteries" with a key raid.mfiutil.battery.status
Then create triggers like
last(/TrueNAS R710 agent/raid.mfiutil)>0
​