-
Problem report
-
Resolution: Fixed
-
Major
-
5.4.0, 5.4.1
-
Sprint 77 (Jun 2021), Sprint 78 (Jul 2021)
-
0.25
Result:
When quering zabbix server 5.2.6 then `inventory_mode` is returned:
+ curl -s -X POST -H 'Content-Type: application/json-rpc' -d ' { "jsonrpc": "2.0", "method": "host.get", "params": { "output": "extend", "selectInventory": "extend", "selectMacros": "extend", "selectTags": "extend", "filter": { "host": "hostname" } }, "auth": "<omitted>", "id": 1 } ' [https://zabbix-server-5.2/api_jsonrpc.php] + jq -r .result [ { "hostid": "host-id", "proxy_hostid": "0", "host": "hostname", "status": "0", "disable_until": "0", "error": "", "available": "0", "errors_from": "0", "lastaccess": "0", "ipmi_authtype": "-1", "ipmi_privilege": "2", "ipmi_username": "", "ipmi_password": "", "ipmi_disable_until": "0", "ipmi_available": "0", "snmp_disable_until": "0", "snmp_available": "0", "maintenanceid": "0", "maintenance_status": "0", "maintenance_type": "0", "maintenance_from": "0", "ipmi_errors_from": "0", "snmp_errors_from": "0", "ipmi_error": "", "snmp_error": "", "jmx_disable_until": "0", "jmx_available": "0", "jmx_errors_from": "0", "jmx_error": "", "name": "hostname", "flags": "0", "templateid": "0", "description": "", "tls_connect": "1", "tls_accept": "1", "tls_issuer": "", "tls_subject": "", "tls_psk_identity": "", "tls_psk": "", "proxy_address": "", "auto_compress": "1", "discover": "0", "custom_interfaces": "0", "inventory_mode": "-1", "macros": [], "tags": [], "inventory": [] } ]
When making same query to 5.4.1 server, `host.get` api call won't return `inventory_mode` parameter.
+ curl -s -X POST -H 'Content-Type: application/json-rpc' -d ' { "jsonrpc": "2.0", "method": "host.get", "params": { "output": "extend", "selectInventory": "extend", "selectMacros": "extend", "selectTags": "extend", "filter": { "host": "hostname" } }, "auth": "<omitted>", "id": 1 } ' [https://zabbix-server-5.4/api_jsonrpc.php] [ { "hostid": "host-id", "proxy_hostid": "0", "host": "hostname", "status": "0", "lastaccess": "0", "ipmi_authtype": "2", "ipmi_privilege": "2", "ipmi_username": "", "ipmi_password": "", "maintenanceid": "0", "maintenance_status": "0", "maintenance_type": "0", "maintenance_from": "0", "name": "hostname", "flags": "0", "templateid": "0", "description": "", "tls_connect": "4", "tls_accept": "4", "tls_issuer": "", "tls_subject": "", "proxy_address": "", "auto_compress": "1", "discover": "0", "custom_interfaces": "0", "uuid": "", "macros": [], "tags": [], "inventory": [] } ]
Expected:
`host.get` method should always return `inventory_mode` parameter with current value that host is set with.
Comments:
This current behavior has already broken (community.zabbix)https://github.com/ansible-collections/community.zabbix/issues/385 playbook.
These changes are not reflected in (documentation)https://www.zabbix.com/documentation/current/manual/api/changes_5.4
Was this change intended or is this some bug?