We're updating all of our Zabbix hosts from passive agents to active agents, which means updating the interface port from 10050 to 10051 on all of the hosts. I can do this manually in the web UI and get a successful connection, but I need to do this on many hosts, so I'm looking at the API. Unfortunately my experience with the API is limited so I'm somewhere groping the dark. I can replicate the examples in the documentation, but I'm having trouble extrapolating to update the port number.
Before trying to do this on all hosts, I'm starting with a simpler case of changing one host. My JSON input looks like this:
But this results in an "invalid JSON" error. What would be the correct syntax to do this? And to extend this, what would be the syntax to apply this to all hosts?
Before trying to do this on all hosts, I'm starting with a simpler case of changing one host. My JSON input looks like this:
Code:
{
"jsonrpc": "2.0",
"method": "item.update",
"params": {
"itemid":"10716"
"port":"10051"
},
"id": 5
}
Comment