Hello!
Zabbix Server v1.8.4 (revision 16604) (4 January 2011)
Use (or rather trying to use the API) class is written in python
Add a host / data elements is! Why, "butted" to add / update action
Crashes
I write the following code
Zabbix Server v1.8.4 (revision 16604) (4 January 2011)
Use (or rather trying to use the API) class is written in python
Add a host / data elements is! Why, "butted" to add / update action
Crashes
10: Response Body: {u'jsonrpc ': u'2 .0', u'id ': 1, u'error': {u'message ': u'Invalid params.', U'code ': -32602, u 'data': u '[CAction:: create] Incorrect parameter used for Action [12 312]}}
Traceback (most recent call last):
File "zabbix_act_create.py", line 9, in <module>
zapi.action.create ({'name': '12312 '})
File "/ usr / share / zabbix / zabbix_api.py", line 317, in wrapper
return self.do_request (self.json_obj (name, opts)) ['result']
File "/ usr / share / zabbix / zabbix_api.py", line 299, in do_requestevaltype
return self.parent.do_request (req)
File "/ usr / share / zabbix / zabbix_api.py", line 264, in do_request
raise ZabbixAPIException (msg, jobj ['error'] ['code'])
Traceback (most recent call last):
File "zabbix_act_create.py", line 9, in <module>
zapi.action.create ({'name': '12312 '})
File "/ usr / share / zabbix / zabbix_api.py", line 317, in wrapper
return self.do_request (self.json_obj (name, opts)) ['result']
File "/ usr / share / zabbix / zabbix_api.py", line 299, in do_requestevaltype
return self.parent.do_request (req)
File "/ usr / share / zabbix / zabbix_api.py", line 264, in do_request
raise ZabbixAPIException (msg, jobj ['error'] ['code'])
zapi.action.create ({'name': "some-name", 'eventsource': 0, 'evaltype': 0, 'status': 0, 'esc_period': 0, 'def_shortdata': "{TRIGGER.NAME }: {TRIGGER.STATUS} ", 'def_longdata':" {TRIGGER.NAME}: {TRIGGER.STATUS} \ r \ nLast value: {ITEM.LASTVALUE} \ r \ n \ r \ n {TRIGGER.URL} ", 'recovery_m sg': 0, 'r_shortdata': "{TRIGGER.NAME}: {TRIGGER.STATUS}", 'r_longdata': "{TRIGGER.NAME}: {TRIGGER.STATUS} \ r \ nLast value: {ITEM . LASTVALUE} \ r \ n \ r \ n {TRIGGER.URL} "})
Comment