Last active
October 3, 2019 08:40
-
-
Save v-zhuravlev/203a10720d3c044b78ca45f865684818 to your computer and use it in GitHub Desktop.
JSON array to Zabbix LLD sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run wmi.getall[root\cimv2,"select * from win32_networkadapter where PhysicalAdapter=True"] | |
// this filters other performance metric counters, so Discard can be applied. | |
output = JSON.parse(value).map(function(net){ | |
return { | |
"{#IFNAME}": net.Name, | |
"{#IFDESCR}": net.Description, | |
"{#IFPHYSICALADAPTER}": net.PhysicalAdapter, | |
"{#IFALIAS}": net.NetConnectionID, | |
"{#IFNETENABLED}": net.NetEnabled | |
}}) | |
return JSON.stringify({"data": output}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment