Hi
I am a newbie at Zabbix and still getting to grips with the platform. I have a powershell script that gives the following output:
[
{
"Duration": 12596,
"TransferredData": 11.71,
"StopTime": "\/Date(1730698241000)\/",
"VMName": "vm1",
"StartTime": "\/Date(1730685645000)\/"
},
{
"Duration": 17277.547761499998,
"TransferredData": 14.5,
"StopTime": "\/Date(-2208996000000)\/",
"VMName": "vm2",
"StartTime": "\/Date(1730685685000)\/"
},
]
I have managed to configure the zabbix agent with the userparameter drjob. The script executes properly and I had to override the timeout to ensure it runs else the default 3s causes it to fail. I am trying to get an item with attributes as supplied by the json payload.
I have read up on multiple blogs and he help guide but am confused on how to get this data into Zabbix. I have tried the following:
Create a template with a discovery rule and LLD macro processing within the discovery rule

Have tried creating an item as well as item prototypes but cannot seem to get the data into Zabbix. I am not sure on the sequence of tasks to get this setup correctly and right now have no way of trying to see what data is being sent by the agent as looking at the agent I don't see any data with the keys defined. The agent is available an online and windows stats are being received correctly. I have also tried using the drjob[*] but still not sure where I am going wrong.
I am also not sure on how Zabbix deal with the JSON date string as it seems that when powershell converts the date fields to JSON the output is the string shared in the snippet above.
Any help of guidance will be appreciated and thank you in advance.
D
I am a newbie at Zabbix and still getting to grips with the platform. I have a powershell script that gives the following output:
[
{
"Duration": 12596,
"TransferredData": 11.71,
"StopTime": "\/Date(1730698241000)\/",
"VMName": "vm1",
"StartTime": "\/Date(1730685645000)\/"
},
{
"Duration": 17277.547761499998,
"TransferredData": 14.5,
"StopTime": "\/Date(-2208996000000)\/",
"VMName": "vm2",
"StartTime": "\/Date(1730685685000)\/"
},
]
I have managed to configure the zabbix agent with the userparameter drjob. The script executes properly and I had to override the timeout to ensure it runs else the default 3s causes it to fail. I am trying to get an item with attributes as supplied by the json payload.
I have read up on multiple blogs and he help guide but am confused on how to get this data into Zabbix. I have tried the following:
Create a template with a discovery rule and LLD macro processing within the discovery rule
Have tried creating an item as well as item prototypes but cannot seem to get the data into Zabbix. I am not sure on the sequence of tasks to get this setup correctly and right now have no way of trying to see what data is being sent by the agent as looking at the agent I don't see any data with the keys defined. The agent is available an online and windows stats are being received correctly. I have also tried using the drjob[*] but still not sure where I am going wrong.
I am also not sure on how Zabbix deal with the JSON date string as it seems that when powershell converts the date fields to JSON the output is the string shared in the snippet above.
Any help of guidance will be appreciated and thank you in advance.
D
). To give you one example how it would work: create an item prototype with following values:
Comment