📜 ⬆️ ⬇️

Zabbix 3.X: monitoring Adaptec controllers on Windows Server (Hyper-V Core)

Good day,% habrauser%! Today, we will tame our hand curves and try to configure the monitoring of Adaptec controllers on Hyper-V (core 2012r2) hosts using Zabbix 3.2, PowerShell and the console utility Adaptec RAID Controller Command Line Utility for monitoring and controlling Adaptec controllers.

And so, the action plan is as follows: Zabbix agent receives a list of parameters from the server for processing, then the agent actively checks using the user parameter and initiates the launch of the PowerShell script with the received parameter. The script starts the Adaptec RAID Controller Command Line Utility with the parameter passed to it, filters the console utility output and issues only the data we need (model, state, logical storage status, physical disks, S / N disks, SMART warnings on the disks), then the agent sends data to the server.

Let's start - we load / clone the repository with the necessary components.

Unpack everything in C: \ zabbix-adaptec \. Add the user parameters we need to the end of zabbix-agentd.conf:
')
user parameters
#Adaptec UserParameter=adaptec.allinfo,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "allinfo" UserParameter=adaptec.model,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "model" UserParameter=adaptec.status,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "status" #Adaptec Logical Device 0 Status UserParameter=adaptec.ldstatus,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "ldstatus" #Adaptec Physical Device Info UserParameter=adaptec.pd0state,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd0state" UserParameter=adaptec.pd0sn,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd0sn" UserParameter=adaptec.pd0smart,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd0smart" UserParameter=adaptec.pd1state,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd1state" UserParameter=adaptec.pd1sn,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd1sn" UserParameter=adaptec.pd1smart,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd1smart" UserParameter=adaptec.pd2state,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd2state" UserParameter=adaptec.pd2sn,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd2sn" UserParameter=adaptec.pd2smart,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd2smart" UserParameter=adaptec.pd3state,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd3state" UserParameter=adaptec.pd3sn,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd3sn" UserParameter=adaptec.pd3smart,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd3smart" UserParameter=adaptec.pd4state,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd4state" UserParameter=adaptec.pd4sn,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd4sn" UserParameter=adaptec.pd4smart,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd4smart" UserParameter=adaptec.pd5state,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd5state" UserParameter=adaptec.pd5sn,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd5sn" UserParameter=adaptec.pd5smart,powershell.exe -file "C:\zabbix-adaptec\zabbix-adaptec.ps1" "pd5smart" 

We import the template in Zabbix: template-adaptec.xml and hang it on the desired host.

Restart the agent and wait for the data!



In the template we have:

State and SMART warnings, S / N of devices, and configured triggers.

Source: https://habr.com/ru/post/323042/


All Articles