python zabbix_api.py -C 192.168.60.13 "Linux servers" "Template OS Linux"
curl -s -X POST -H \'Content-Type:application/json\' -d \' { "jsonrpc": "2.0", "method": "host.create", "params": { "host": "Linux server", "interfaces": [ { "type": 1, "main": 1, "useip": 1, "ip": "192.168.60.13", "dns": "", "port": "10050" } ], "groups": [ { "groupid": "2" } ], "templates": [ { "templateid": "10001" } ], }, "auth": "c420a53318369184c9a6e00d439342fb", "id": 2 }\' http://192.168.60.217/zabbix/api_jsonrpc.php|python -mjson.tool
Enabling a host:
{ "jsonrpc": "2.0", "method": "host.update", "params": { "hostid": "10092", "status": 0 }, "auth": "038e1d7b1735c6a5436ee9eae095879e", "id": 1 }
http://www.361way.com/zabbix-api-2/3681.html
https://raw.githubusercontent.com/joe011/zabbix/master/zabbix_api.py