Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com>2021-08-18 16:44:58 +0300
committerArtjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com>2021-08-18 16:44:58 +0300
commit2454ff4c46ca1bcc50bf4550afc380a6881f7de6 (patch)
tree0bd6892a0bc556a9253b8d5622fa86c8da0184bc /src/libs/zbxaudit/audit_host.c
parenteb36dac157c78b78abac714a3959d528e41a3031 (diff)
........S. [ZBXNEXT-6802] fixed formatting according to front-end concerns
Diffstat (limited to 'src/libs/zbxaudit/audit_host.c')
-rw-r--r--src/libs/zbxaudit/audit_host.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/libs/zbxaudit/audit_host.c b/src/libs/zbxaudit/audit_host.c
index 4f0e5affbd1..dfe8ebb5a5a 100644
--- a/src/libs/zbxaudit/audit_host.c
+++ b/src/libs/zbxaudit/audit_host.c
@@ -199,17 +199,17 @@ void zbx_audit_##funcname##_update_json_add_interfaces(zbx_uint64_t hostid, zbx_
RETURN_IF_AUDIT_OFF(); \
\
zbx_snprintf(audit_key_main, AUDIT_DETAILS_KEY_LEN, #auditentry".interfaces[" ZBX_FS_UI64 \
- "].details.main", interfaceid); \
+ "].main", interfaceid); \
zbx_snprintf(audit_key_type, AUDIT_DETAILS_KEY_LEN, #auditentry".interfaces[" ZBX_FS_UI64 \
- "].details.type", interfaceid); \
+ "].type", interfaceid); \
zbx_snprintf(audit_key_useip, AUDIT_DETAILS_KEY_LEN, #auditentry".interfaces[" ZBX_FS_UI64 \
- "].details.useip", interfaceid); \
+ "].useip", interfaceid); \
zbx_snprintf(audit_key_ip, AUDIT_DETAILS_KEY_LEN, #auditentry".interfaces[" ZBX_FS_UI64 \
- "].details.ip", interfaceid); \
+ "].ip", interfaceid); \
zbx_snprintf(audit_key_dns, AUDIT_DETAILS_KEY_LEN, #auditentry".interfaces[" ZBX_FS_UI64 \
- "].details.dns", interfaceid); \
+ "].dns", interfaceid); \
zbx_snprintf(audit_key_port, AUDIT_DETAILS_KEY_LEN, #auditentry".interfaces[" ZBX_FS_UI64 \
- "].details.port", interfaceid); \
+ "].port", interfaceid); \
\
zbx_audit_update_json_append_uint64(hostid, AUDIT_DETAILS_ACTION_ADD, audit_key_main, main_); \
zbx_audit_update_json_append_uint64(hostid, AUDIT_DETAILS_ACTION_ADD, audit_key_type, type); \
@@ -248,7 +248,7 @@ void zbx_audit_hostgroup_update_json_attach(zbx_uint64_t hostid, zbx_uint64_t ho
RETURN_IF_AUDIT_OFF();
- zbx_snprintf(buf, sizeof(buf), "host.groups[" ZBX_FS_UI64 "]", hostgroupid);
+ zbx_snprintf(buf, sizeof(buf), "host.groups[" ZBX_FS_UI64 "].groupid", hostgroupid);
zbx_audit_update_json_append_uint64(hostid, AUDIT_DETAILS_ACTION_ATTACH, buf, groupid);
}
@@ -264,7 +264,7 @@ void zbx_audit_host_hostgroup_delete(zbx_uint64_t hostid, const char* hostname,
for (i = 0; i < groupids->values_num; i++)
{
- zbx_snprintf(buf, sizeof(buf), "host.groups[" ZBX_FS_UI64 "]", hostgroupids->values[i]);
+ zbx_snprintf(buf, sizeof(buf), "host.groups[" ZBX_FS_UI64 "].groupid", hostgroupids->values[i]);
zbx_audit_update_json_append_uint64(hostid, AUDIT_DETAILS_ACTION_DETACH, buf,
groupids->values[i]);
}
@@ -289,7 +289,7 @@ void zbx_audit_host_prototype_update_json_add_details(zbx_uint64_t hostid, zbx_u
{
RETURN_IF_AUDIT_OFF();
- zbx_audit_update_json_append_uint64(hostid, AUDIT_DETAILS_ACTION_ATTACH, "hostprototype.templateid",
+ zbx_audit_update_json_append_uint64(hostid, AUDIT_DETAILS_ACTION_ADD, "hostprototype.templateid",
templateid);
zbx_audit_update_json_append_string(hostid, AUDIT_DETAILS_ACTION_ADD, "hostprototype.name", name);
zbx_audit_update_json_append_int(hostid, AUDIT_DETAILS_ACTION_ADD, "hostprototype.status", status);
@@ -302,7 +302,7 @@ void zbx_audit_host_prototype_update_json_add_templateid(zbx_uint64_t hostid, zb
{
RETURN_IF_AUDIT_OFF();
- zbx_audit_update_json_append_uint64(hostid, AUDIT_DETAILS_ACTION_ATTACH, "hostprototype.templateid",
+ zbx_audit_update_json_append_uint64(hostid, AUDIT_DETAILS_ACTION_ADD, "hostprototype.templateid",
templateid);
}
@@ -330,12 +330,12 @@ void zbx_audit_host_prototype_update_json_add_group_details(zbx_uint64_t hostid,
if (0 != strlen(name))
{
- zbx_snprintf(buf, sizeof(buf), "hostprototype.groupPrototypes[%s]", name);
+ zbx_snprintf(buf, sizeof(buf), "hostprototype.groupPrototypes[%s].name", name);
zbx_audit_update_json_append_uint64(hostid, AUDIT_DETAILS_ACTION_ADD, buf, templateid);
}
else if (0 != groupid)
{
- zbx_snprintf(buf, sizeof(buf), "hostprototype.groupLinks[" ZBX_FS_UI64 "]", groupid);
+ zbx_snprintf(buf, sizeof(buf), "hostprototype.groupLinks[" ZBX_FS_UI64 "].groupid", groupid);
zbx_audit_update_json_append_uint64(hostid, AUDIT_DETAILS_ACTION_ATTACH, buf,
templateid);
}
@@ -348,20 +348,20 @@ void zbx_audit_host_prototype_update_json_update_group_links(zbx_uint64_t hostid
RETURN_IF_AUDIT_OFF();
- zbx_snprintf(buf, AUDIT_DETAILS_KEY_LEN, "hostprototype.groupLinks[" ZBX_FS_UI64 "]", groupid);
+ zbx_snprintf(buf, AUDIT_DETAILS_KEY_LEN, "hostprototype.groupLinks[" ZBX_FS_UI64 "].groupid", groupid);
zbx_audit_update_json_update_uint64(hostid, buf, templateid_old, templateid_new);
}
#define PREPARE_AUDIT_TEMPLATE_OP(funcname, auditentry, op1, op2) \
void zbx_audit_##funcname##_update_json_##op1##_parent_template(zbx_uint64_t hostid, \
- zbx_uint64_t templateid) \
+ zbx_uint64_t hosttemplateid, zbx_uint64_t templateid) \
{ \
char buf[AUDIT_DETAILS_KEY_LEN]; \
\
RETURN_IF_AUDIT_OFF(); \
\
- zbx_snprintf(buf, sizeof(buf), #auditentry".templates[" ZBX_FS_UI64 "].templateid", templateid); \
+ zbx_snprintf(buf, sizeof(buf), #auditentry".templates[" ZBX_FS_UI64 "].templateid", hosttemplateid); \
\
zbx_audit_update_json_append_uint64(hostid, op2, buf, templateid); \
} \