community.zabbix
community.zabbix copied to clipboard
Zabbix 5.4 support
SUMMARY
5.4 out since 17th May https://www.zabbix.com/documentation/current/manual/api/changes_5.2_-_5.4
- [x] #385
- [x] #387
- [ ] #412
- [ ] zabbix_action 5.4 tests failing on:
fatal: [testhost]: FAILED! => {"changed": false, "msg": "Failed to create action 'ExampleTriggerActionConditions': ('Error -32500: Application error., Incorrect action condition type. while sending {\"jsonrpc\": \"2.0\", \"method\": \"action.create\", \"params\": {\"name\": \"ExampleTriggerActionConditions\", \"eventsource\": \"0\", \"esc_period\": \"60\", \"filter\": {\"conditions\": [{\"conditiontype\": \"0\", \"value\": \"2\", \"operator\": \"0\"}, {\"conditiontype\": \"4\", \"value\": \"3\", \"operator\": \"5\"}, {\"conditiontype\": \"15\", \"value\": \"AnsibleTest\", \"operator\": \"2\"}, {\"conditiontype\": \"26\", \"value\": \"MyTag\", \"value2\": \"MyTagValue\", \"operator\": \"0\"}, {\"conditiontype\": \"6\", \"value\": \"6-7,00:00-24:00\", \"operator\": \"7\"}], \"evaltype\": \"0\"}, \"operations\": [{\"operationtype\": \"0\", \"esc_step_from\": 1, \"esc_step_to\": 1, \"opmessage\": {\"default_msg\": \"0\", \"mediatypeid\": \"36\", \"message\": \"ExampleMessage\", \"subject\": \"ExampleSubject\"}, \"opmessage_usr\": [{\"userid\": \"1\"}], \"opconditions\": []}], \"recovery_operations\": [], \"acknowledge_operations\": [], \"status\": \"0\", \"pause_suppressed\": \"1\"}, \"auth\": \"fb314aab4efbebd1aa575391ceb16aae\", \"id\": 3}', -32500)"}
- [x] zabbix_host 5.4 tests failing on:
fatal: [testhost]: FAILED! => {"changed": false, "msg": "Failed to update host ExampleHost: ('Error -32602: Invalid params., Host cannot have more than one default interface of the same type. while sending {\"jsonrpc\": \"2.0\", \"method\": \"hostinterface.create\", \"params\": {\"main\": 1, \"type\": 1, \"useip\": 1, \"ip\": \"10.1.1.1\", \"dns\": \"\", \"port\": \"10050\", \"available\": \"0\", \"error\": \"\", \"errors_from\": \"0\", \"disable_until\": \"0\", \"details\": {}, \"hostid\": \"10453\"}, \"auth\": \"5c742f90c1c8cab385cacd8c0c1162e4\", \"id\": 18}', -32602)"}
- [x] zabbix_host_info 5.4 tests failing on:
fatal: [testhost]: FAILED! => {"changed": false, "msg": "Template not found: Zabbix Server"}
- [ ] zabbix_screen no longer supported in 5.4:
fatal: [testhost]: FAILED! => {"changed": false, "msg": "Failed to get screen TestScreen1 from Zabbix: ('Error -32601: Method not found., Incorrect API \"screen\". while sending {\"jsonrpc\": \"2.0\", \"method\": \"screen.get\", \"params\": {\"output\": \"extend\", \"search\": {\"name\": \"TestScreen1\"}}, \"auth\": \"8d4741d9a4367609fca4362dcd80ed0b\", \"id\": 2}', -32601)"}
- [ ] zabbix_service 5.4 tests failling on:
fatal: [testhost]: FAILED! => {"changed": false, "msg": "Trigger Zabbix http poller processes more than 75% busy not found on host Zabbix server"}
- [ ] zabbix_template and zabbix_template_info 5.4 tests failling on:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: zabbix_api.ZabbixAPIException: ('Error -32602: Invalid params., Invalid parameter "/1/macros": an array is expected. while sending {"jsonrpc": "2.0", "method": "template.create", "params": {"host": "ExampleHost", "groups": [{"groupid": "1"}, {"groupid": "2"}], "templates": null, "macros": null}, "auth": "0cd9edb6266c696125c71090b81dc982", "id": 6}', -32602) fatal: [testhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/dede/.ansible/tmp/ansible-tmp-1635667119.6473494-229053-72693945714231/AnsiballZ_zabbix_template.py\", line 114, in <module>\n _ansiballz_main()\n File \"/home/dede/.ansible/tmp/ansible-tmp-1635667119.6473494-229053-72693945714231/AnsiballZ_zabbix_template.py\", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/dede/.ansible/tmp/ansible-tmp-1635667119.6473494-229053-72693945714231/AnsiballZ_zabbix_template.py\", line 54, in invoke_module\n runpy.run_module(mod_name='ansible_collections.community.zabbix.plugins.modules.zabbix_template', init_globals=dict(_module_fqn='ansible_collections.community.zabbix.plugins.modules.zabbix_template', _modlib_path=modlib_path),\n File \"/usr/lib/python3.9/runpy.py\", line 210, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.9/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.9/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_zabbix_template_payload_x3itnwbu/ansible_zabbix_template_payload.zip/ansible_collections/community/zabbix/plugins/modules/zabbix_template.py\", line 781, in <module>\n File \"/tmp/ansible_zabbix_template_payload_x3itnwbu/ansible_zabbix_template_payload.zip/ansible_collections/community/zabbix/plugins/modules/zabbix_template.py\", line 760, in main\n File \"/tmp/ansible_zabbix_template_payload_x3itnwbu/ansible_zabbix_template_payload.zip/ansible_collections/community/zabbix/plugins/modules/zabbix_template.py\", line 362, in add_template\n File \"/home/dede/.local/lib/python3.9/site-packages/zabbix_api.py\", line 341, in method\n return self.universal(\"%s.%s\" % (self.data[\"prefix\"], name), opts[0])\n File \"/home/dede/.local/lib/python3.9/site-packages/zabbix_api.py\", line 79, in wrapper\n return self.do_request(self.json_obj(method, opts))['result']\n File \"/home/dede/.local/lib/python3.9/site-packages/zabbix_api.py\", line 348, in do_request\n return self.parent.do_request(req)\n File \"/home/dede/.local/lib/python3.9/site-packages/zabbix_api.py\", line 299, in do_request\n raise ZabbixAPIException(msg, jobj['error']['code'])\nzabbix_api.ZabbixAPIException: ('Error -32602: Invalid params., Invalid parameter \"/1/macros\": an array is expected. while sending {\"jsonrpc\": \"2.0\", \"method\": \"template.create\", \"params\": {\"host\": \"ExampleHost\", \"groups\": [{\"groupid\": \"1\"}, {\"groupid\": \"2\"}], \"templates\": null, \"macros\": null}, \"auth\": \"0cd9edb6266c696125c71090b81dc982\", \"id\": 6}', -32602)\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
- [ ] zabbix_user_info 5.4 tests failing on:
fatal: [testhost]: FAILED! => {"msg": "The conditional check 'get_user_info_result2[user_info_key].alias == \"example2\"' failed. The error was: error while evaluating conditional (get_user_info_result2[user_info_key].alias == \"example2\"): 'dict object' has no attribute 'alias'"}
ISSUE TYPE
- Feature Idea
COMPONENT NAME
plugins/* roles/*
Hello, I did not find any issue about the subject, forgive me if it was already mentioned somewhere.
Zabbix 5.0 introduced secret text macro : https://www.zabbix.com/documentation/5.0/manual/config/macros/user_macros And Zabbix 5.2 also introduced secret Vault macro : https://www.zabbix.com/documentation/5.2/manual/config/macros/user_macros
Both are very interresting features, but it does not seems that community.zabbix.zabbix_hostmacro supports them ?
@NoxInmortus sorry, I somehow overlooked your comment. This is unfortunate truth, that our zabbix_host has better implementation of macros than actual zabbix_hostmacro.
Can you please open (one) separate issue for these (two) topics you mentioned here? This issue is not the best place to track such things.
Hi @D3DeFi Is this still an open issue? Or can we close this one?
judging by the list in the description, it is still not fully done
Nice, thanks for pointing this issue out @D3DeFi. As said in other #580 I will open a separate branch and working on this there.
Supporting 5.4 will help us shifting to 6.0 then.
closing as OBE since we're only supporting 5.0