diff options
author | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2021-08-26 11:38:49 +0300 |
---|---|---|
committer | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2021-09-03 09:13:22 +0300 |
commit | 8e8d5fbb8713ac580aede686c2185d9c4eab9f60 (patch) | |
tree | 391f83aade9240fb6a3ec1cba315f7fef160fa04 /src/libs/zbxaudit/audit_trigger.h | |
parent | 38785243dd88aa385e59193a5b41584e4481fca4 (diff) |
........S. [ZBXNEXT-6855] added templateid orig
Diffstat (limited to 'src/libs/zbxaudit/audit_trigger.h')
-rw-r--r-- | src/libs/zbxaudit/audit_trigger.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libs/zbxaudit/audit_trigger.h b/src/libs/zbxaudit/audit_trigger.h index e85bd7ce36b..c24a72fd89c 100644 --- a/src/libs/zbxaudit/audit_trigger.h +++ b/src/libs/zbxaudit/audit_trigger.h @@ -25,5 +25,33 @@ #include "../zbxdbhigh/template.h" +#define PREPARE_AUDIT_TRIGGER_H(funcname, audit_resource_flag) \ +void zbx_audit_##funcname##_create_entry(int audit_action, zbx_uint64_t triggerid, const char *name); +PREPARE_AUDIT_TRIGGER_H(trigger, AUDIT_RESOURCE_TRIGGER) +PREPARE_AUDIT_TRIGGER_H(trigger_prototype, AUDIT_RESOURCE_TRIGGER_PROTOTYPE) + +void zbx_audit_trigger_update_json_add_data(zbx_uint64_t triggerid, zbx_uint64_t templateid, + unsigned char recovery_mode, unsigned char status, unsigned char type, zbx_uint64_t value, + zbx_uint64_t state, unsigned char priority, const char *comments, const char *url, unsigned char flags, + unsigned char correlation_mode, const char *correlation_tag, unsigned char manual_close, + const char *opdata, unsigned char discover, const char *event_name); + +void zbx_audit_trigger_update_json_add_expr(zbx_uint64_t triggerid, unsigned char flags, const char *expression); +void zbx_audit_trigger_update_json_add_rexpr(zbx_uint64_t triggerid, unsigned char flags, + const char *recovery_expression); + +#define PREPARE_AUDIT_TRIGGER_UPDATE_H(resource, type1, type2) \ +void zbx_audit_trigger_update_json_update_##resource(zbx_uint64_t triggerid, unsigned char flags, \ + type1 resource##_old, type1 resource##_new); +PREPARE_AUDIT_TRIGGER_UPDATE_H(flags, int, int) +PREPARE_AUDIT_TRIGGER_UPDATE_H(recovery_mode, int, int) +PREPARE_AUDIT_TRIGGER_UPDATE_H(correlation_mode, int, int) +PREPARE_AUDIT_TRIGGER_UPDATE_H(manual_close, int, int) +PREPARE_AUDIT_TRIGGER_UPDATE_H(opdata, const char*, string) +PREPARE_AUDIT_TRIGGER_UPDATE_H(discover, int, int) +PREPARE_AUDIT_TRIGGER_UPDATE_H(event_name, const char*, string) +PREPARE_AUDIT_TRIGGER_UPDATE_H(templateid, zbx_uint64_t, uint64) + + #endif /* ZABBIX_AUDIT_TRIGGER_H */ |