diff options
author | Andris Zeila <andris.zeila@zabbix.com> | 2021-10-13 13:01:58 +0300 |
---|---|---|
committer | Andris Zeila <andris.zeila@zabbix.com> | 2021-10-13 13:01:58 +0300 |
commit | b0472aeea001dc7d5aadc079a5754f27edf5b755 (patch) | |
tree | 249ad95e80b4759281c955fedc22420721050d69 /src/libs/zbxaudit | |
parent | 25baddcf7bbf965962ad93440c2795acfcbb7e74 (diff) |
........S. [ZBXNEXT-6923] fixed audit object naming
Diffstat (limited to 'src/libs/zbxaudit')
-rw-r--r-- | src/libs/zbxaudit/audit_ha.c | 7 | ||||
-rw-r--r-- | src/libs/zbxaudit/audit_ha.h | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/libs/zbxaudit/audit_ha.c b/src/libs/zbxaudit/audit_ha.c index 3ea94e1674e..6782444cd9c 100644 --- a/src/libs/zbxaudit/audit_ha.c +++ b/src/libs/zbxaudit/audit_ha.c @@ -20,6 +20,7 @@ #include "zbxalgo.h" #include "zbxjson.h" #include "audit.h" +#include "audit_ha.h" void zbx_audit_ha_create_entry(int audit_action, const char *nodeid, const char *name) { @@ -47,9 +48,9 @@ void zbx_audit_ha_add_create_fields(const char *nodeid, const char *name, int st entry = zbx_audit_get_entry(0, nodeid); - zbx_audit_entry_append_string(entry, AUDIT_ACTION_ADD, "ha_node.ha_nodeid", nodeid); - zbx_audit_entry_append_string(entry, AUDIT_ACTION_ADD, "ha_node.name", name); - zbx_audit_entry_append_int(entry, AUDIT_ACTION_ADD, "ha_node.status", status); + zbx_audit_entry_append_string(entry, AUDIT_ACTION_ADD, ZBX_AUDIT_HA_NODEID, nodeid); + zbx_audit_entry_append_string(entry, AUDIT_ACTION_ADD, ZBX_AUDIT_HA_NAME, name); + zbx_audit_entry_append_int(entry, AUDIT_ACTION_ADD, ZBX_AUDIT_HA_STATUS, status); } void zbx_audit_ha_update_field_string(const char *nodeid, const char *key, const char *old_value, diff --git a/src/libs/zbxaudit/audit_ha.h b/src/libs/zbxaudit/audit_ha.h index 16ac5149ec0..2a4fe3b8dfd 100644 --- a/src/libs/zbxaudit/audit_ha.h +++ b/src/libs/zbxaudit/audit_ha.h @@ -20,6 +20,13 @@ #ifndef ZABBIX_AUDIT_HA_H #define ZABBIX_AUDIT_HA_H +#define ZBX_AUDIT_HA_NODE "hanode" +#define ZBX_AUDIT_HA_NODEID ZBX_AUDIT_HA_NODE ".ha_nodeid" +#define ZBX_AUDIT_HA_NAME ZBX_AUDIT_HA_NODE ".name" +#define ZBX_AUDIT_HA_STATUS ZBX_AUDIT_HA_NODE ".status" +#define ZBX_AUDIT_HA_ADDRESS ZBX_AUDIT_HA_NODE ".address" +#define ZBX_AUDIT_HA_PORT ZBX_AUDIT_HA_NODE ".port" + void zbx_audit_ha_create_entry(int audit_action, const char *nodeid, const char *name); void zbx_audit_ha_add_create_fields(const char *nodeid, const char *name, int status); void zbx_audit_ha_update_field_string(const char *nodeid, const char *key, const char *old_value, |