Custom Discovery PowerShell-Script: Unterschied zwischen den Versionen
Aus Wiki-WebPerfect
Admin (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „== Example Monitor Windows Storage Mountpoints == === PowerShell-Script on the target System === Write a PowerShell-Script "Get-CSVsForDiscovery.ps1" with the…“) |
(kein Unterschied)
|
Version vom 3. Dezember 2019, 09:08 Uhr
Inhaltsverzeichnis
Example Monitor Windows Storage Mountpoints
PowerShell-Script on the target System
Write a PowerShell-Script "Get-CSVsForDiscovery.ps1" with the following content and save this in "C:\Program Files\Zabbix Agent":
$json = (Get-ChildItem "C:\ClusterStorage\" | Select @{Name='{#CSVNAME}';Expression={$_.Name}} | ConvertTo-Json) $final = ('{"data":'+$json+'}') $final
Zabbix Agent Configuration (zabbix_agentd.conf)
Add the following line:
UserParameter=custom.discovery.csvnames,powershell -File "C:\Program Files\Zabbix Agent\Get-CSVsForDiscovery.ps1"