diff options
author | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2021-09-21 17:45:53 +0300 |
---|---|---|
committer | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2021-09-21 17:47:39 +0300 |
commit | 136675e9b0d2a216b1d6c0606eb03c4e3173640d (patch) | |
tree | 1369aa8aa167a047bc0989ca9731cfbe7954e64f /src/libs/zbxaudit/audit_host.c | |
parent | 20722cbeedbb5c8d5a47e63bcadb36dc479970b3 (diff) |
........S. [ZBX-19781] fixed server not linking host prototype inventory mode
Diffstat (limited to 'src/libs/zbxaudit/audit_host.c')
-rw-r--r-- | src/libs/zbxaudit/audit_host.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/libs/zbxaudit/audit_host.c b/src/libs/zbxaudit/audit_host.c index 5184e55a53f..5effc932275 100644 --- a/src/libs/zbxaudit/audit_host.c +++ b/src/libs/zbxaudit/audit_host.c @@ -513,7 +513,7 @@ void zbx_audit_host_prototype_del(zbx_uint64_t hostid, const char *hostname) } void zbx_audit_host_prototype_update_json_add_details(zbx_uint64_t hostid, zbx_uint64_t templateid, - const char *name, int status, int discover, int custom_interfaces) + const char *name, int status, int discover, int custom_interfaces, int inventory_mode) { RETURN_IF_AUDIT_OFF(); @@ -524,6 +524,8 @@ void zbx_audit_host_prototype_update_json_add_details(zbx_uint64_t hostid, zbx_u zbx_audit_update_json_append_int(hostid, AUDIT_DETAILS_ACTION_ADD, "hostprototype.discover", discover); zbx_audit_update_json_append_int(hostid, AUDIT_DETAILS_ACTION_ADD, "hostprototype.custom_interfaces", custom_interfaces); + zbx_audit_update_json_append_int(hostid, AUDIT_DETAILS_ACTION_ADD, "hostprototype.inventory_mode", + inventory_mode); } void zbx_audit_host_prototype_update_json_update_templateid(zbx_uint64_t hostid, zbx_uint64_t templateid_orig, @@ -547,6 +549,7 @@ PREPARE_AUDIT_HOST_PROTOTYPE_UPDATE(name, const char*, string) PREPARE_AUDIT_HOST_PROTOTYPE_UPDATE(status, int, int) PREPARE_AUDIT_HOST_PROTOTYPE_UPDATE(discover, int, int) PREPARE_AUDIT_HOST_PROTOTYPE_UPDATE(custom_interfaces, int, int) +PREPARE_AUDIT_HOST_PROTOTYPE_UPDATE(inventory_mode, int, int) #undef PREPARE_AUDIT_HOST_PROTOTYPE_UPDATE void zbx_audit_host_prototype_update_json_add_group_details(zbx_uint64_t hostid, zbx_uint64_t group_prototypeid, @@ -668,6 +671,17 @@ void zbx_audit_host_prototype_update_json_delete_interface(zbx_uint64_t hostid, zbx_audit_update_json_delete(hostid, AUDIT_DETAILS_ACTION_DELETE, buf); } +void zbx_audit_host_prototype_update_json_delete_inventory_mode(zbx_uint64_t hostid) +{ + char buf[AUDIT_DETAILS_KEY_LEN]; + + RETURN_IF_AUDIT_OFF(); + + zbx_snprintf(buf, sizeof(buf), "hostprototype.inventory_mode"); + + zbx_audit_update_json_delete(hostid, AUDIT_DETAILS_ACTION_DELETE, buf); +} + void zbx_audit_host_prototype_update_json_add_hostmacro(zbx_uint64_t hostid, zbx_uint64_t macroid, const char *macro, const char *value, const char *description, int type) { |