Here is PowerShell script:Add user parameters in Zabbix agent conf file:
UserParameter=discover.win.vol,powershell -NoProfile -ExecutionPolicy Bypass -File "C:\zabbix\discover-windows-mount-points.ps1"
UserParameter=get.free.space.vol[*],powershell -nologo -command "Get-WmiObject Win32_Volume -Property DeviceID,FreeSpace | where-object { $_.DeviceID -eq '$1' } | foreach { $_.FreeSpace }"
UserParameter=get.total.space.vol[*],powershell -nologo -command "Get-WmiObject Win32_Volume -Property DeviceID,Capacity | where-object { $_.DeviceID -eq '$1' } | foreach { $_.Capacity }"Import template (Zabbix 3.0 compatible):Assigne template to Windows hostRestart Zabbix agent
Confirm I got values received:



No comments:
Post a Comment