0

I wanted to run an automatic key update for my zabbix item whenever a new version of my service is released as against going to manually edit the key in the Zabbix console.

My issue is that the documentation provided by zabbix on items update is in JSON but I need it to be in Bash. Can anyone help?

Link to the documentation: https://www.zabbix.com/documentation/current/en/manual/api/reference/item/update

The code:

{ "jsonrpc": "2.0", "method": "key.update", "params": { "key": "25562", "itemid": "189019" }, "auth": "700ca65537074ec963db7efabda78259", "id": 1 }

limelight
  • 1
  • 1
  • Documentation is JSON because that's the only thing you can send to the Zabbix REST API. You can write a Bash script to send JSON (using curl or wget, for example) to the API. You can also write a Bash script to create a LLD for the service name, or maybe use `systemd.unit.discovery` available in Agent2 only, if applicable. – Iron Bishop Oct 17 '22 at 11:46

0 Answers0