#include "audit/zbxaudit.h"
void zbx_audit_item_update_json_add_lld_data(zbx_uint64_t itemid, const zbx_lld_item_full_t *item,
const zbx_lld_item_prototype_t *item_prototype, zbx_uint64_t hostid)
RETURN_IF_AUDIT_OFF(ZBX_AUDIT_LLD_CONTEXT);
#define ADD_JSON_S(x, t, f) zbx_audit_update_json_append_string(itemid, AUDIT_ITEM_ID, AUDIT_DETAILS_ACTION_ADD, \
#define ADD_JSON_UI(x, t, f) zbx_audit_update_json_append_uint64(itemid, AUDIT_ITEM_ID, AUDIT_DETAILS_ACTION_ADD, \
#define ADD_JSON_P_S(x, t, f) zbx_audit_update_json_append_string(itemid, AUDIT_ITEM_ID, AUDIT_DETAILS_ACTION_ADD, \
IT(x), item_prototype->x, t, f)
#define ADD_JSON_P_UI(x, t, f) zbx_audit_update_json_append_uint64(itemid, AUDIT_ITEM_ID, AUDIT_DETAILS_ACTION_ADD, \
IT(x), item_prototype->x, t, f)
#define AUDIT_TABLE_NAME "items"
zbx_audit_update_json_append_uint64(itemid, AUDIT_ITEM_ID, AUDIT_DETAILS_ACTION_ADD, IT(itemid), itemid, \
AUDIT_TABLE_NAME, "itemid");
ADD_JSON_S(delay, AUDIT_TABLE_NAME, "delay");
zbx_audit_update_json_append_uint64(itemid, AUDIT_ITEM_ID, AUDIT_DETAILS_ACTION_ADD, IT(hostid), hostid, \
AUDIT_TABLE_NAME, "hostid");
ADD_JSON_S(name, AUDIT_TABLE_NAME, "name");
ADD_JSON_S(key, AUDIT_TABLE_NAME, "key_");
ADD_JSON_P_UI(type, AUDIT_TABLE_NAME, "type");
ADD_JSON_P_UI(value_type, AUDIT_TABLE_NAME, "value_type");
ADD_JSON_S(history, AUDIT_TABLE_NAME, "history");
ADD_JSON_S(trends, AUDIT_TABLE_NAME, "trends");
ADD_JSON_UI(status, AUDIT_TABLE_NAME, "status");
ADD_JSON_P_S(trapper_hosts, AUDIT_TABLE_NAME, "trapper_hosts");
ADD_JSON_S(units, AUDIT_TABLE_NAME, "units");
ADD_JSON_P_S(formula, AUDIT_TABLE_NAME, "formula");
ADD_JSON_P_S(logtimefmt, AUDIT_TABLE_NAME, "logtimefmt");
ADD_JSON_P_UI(valuemapid, AUDIT_TABLE_NAME, "valuemapid");
ADD_JSON_S(params, AUDIT_TABLE_NAME, "params");
ADD_JSON_S(ipmi_sensor, AUDIT_TABLE_NAME, "ipmi_sensor");
ADD_JSON_S(snmp_oid, AUDIT_TABLE_NAME, "snmp_oid");
ADD_JSON_P_UI(authtype, AUDIT_TABLE_NAME, "authtype");
ADD_JSON_S(username, AUDIT_TABLE_NAME, "username");
zbx_audit_update_json_append_string_secret(itemid, AUDIT_ITEM_ID, AUDIT_DETAILS_ACTION_ADD, IT(password),
item->password, AUDIT_TABLE_NAME, "password");
ADD_JSON_P_S(publickey, AUDIT_TABLE_NAME, "publickey");
ADD_JSON_P_S(privatekey, AUDIT_TABLE_NAME, "privatekey");
ADD_JSON_S(description, AUDIT_TABLE_NAME, "description");
ADD_JSON_P_UI(interfaceid, AUDIT_TABLE_NAME, "interfaceid");
zbx_audit_update_json_append_uint64(itemid, AUDIT_ITEM_ID, AUDIT_DETAILS_ACTION_ADD, "item.flags",