diff options
author | Vladislavs Sokurenko <vladislavs.sokurenko@zabbix.com> | 2021-05-12 11:11:54 +0300 |
---|---|---|
committer | Vladislavs Sokurenko <vladislavs.sokurenko@zabbix.com> | 2021-05-12 11:41:02 +0300 |
commit | 7179d22fecc24be41297695c3cb1e29d9a6eb37d (patch) | |
tree | 7340c5a00298b5764e219218fb2959d6f91aaa4a /include | |
parent | 77013e08b686205affb2faaca9f1ca82c75b5422 (diff) |
........S. [ZBX-19307] cherry-picked from 5.2 and fixed conflicts
Diffstat (limited to 'include')
-rw-r--r-- | include/dbcache.h | 22 | ||||
-rw-r--r-- | include/zbxserver.h | 3 |
2 files changed, 24 insertions, 1 deletions
diff --git a/include/dbcache.h b/include/dbcache.h index d5af39b9fe8..3a01dfca9fe 100644 --- a/include/dbcache.h +++ b/include/dbcache.h @@ -650,6 +650,26 @@ zbx_uint64_t DCget_nextid(const char *table_name, int num); #define ZBX_DBSYNC_UPDATE 1 #define ZBX_SYNC_SECRETS 2 +#define ZBX_ITEM_GET_MISC 0x001 +#define ZBX_ITEM_GET_DELAY 0x002 +#define ZBX_ITEM_GET_EMPTY_ERROR 0x004 +#define ZBX_ITEM_GET_NUM 0x008 +#define ZBX_ITEM_GET_EMPTY_UNITS 0x010 +#define ZBX_ITEM_GET_LOGTIMEFMT 0x020 +#define ZBX_ITEM_GET_POLLINFO 0x040 +#define ZBX_ITEM_GET_INTERFACE 0x080 +#define ZBX_ITEM_GET_HOSTNAME 0x100 +#define ZBX_ITEM_GET_HOSTINFO 0x200 +#define ZBX_ITEM_GET_MAINTENANCE 0x400 +#define ZBX_ITEM_GET_INVENTORY 0x800 + +#define ZBX_ITEM_GET_ALL (~(unsigned int)0) + +#define ZBX_ITEM_GET_SYNC (ZBX_ITEM_GET_INVENTORY|ZBX_ITEM_GET_NUM) +#define ZBX_ITEM_GET_SYNC_EXPORT (ZBX_ITEM_GET_INVENTORY|ZBX_ITEM_GET_NUM|ZBX_ITEM_GET_HOSTNAME) + +#define ZBX_ITEM_GET_PROCESS (ZBX_ITEM_GET_MAINTENANCE|ZBX_ITEM_GET_MISC|ZBX_ITEM_GET_LOGTIMEFMT) + void DCsync_configuration(unsigned char mode, const struct zbx_json_parse *jp_kvs_paths); int init_configuration_cache(char **error); void free_configuration_cache(void); @@ -662,6 +682,8 @@ int DCconfig_get_hostid_by_name(const char *host, zbx_uint64_t *hostid); void DCconfig_get_hosts_by_itemids(DC_HOST *hosts, const zbx_uint64_t *itemids, int *errcodes, size_t num); void DCconfig_get_items_by_keys(DC_ITEM *items, zbx_host_key_t *keys, int *errcodes, size_t num); void DCconfig_get_items_by_itemids(DC_ITEM *items, const zbx_uint64_t *itemids, int *errcodes, size_t num); +void DCconfig_get_items_by_itemids_partial(DC_ITEM *items, const zbx_uint64_t *itemids, int *errcodes, size_t num, + unsigned int mode); void DCconfig_get_preprocessable_items(zbx_hashset_t *items, int *timestamp); void DCconfig_get_functions_by_functionids(DC_FUNCTION *functions, zbx_uint64_t *functionids, int *errcodes, size_t num); diff --git a/include/zbxserver.h b/include/zbxserver.h index 77e534feb41..f41f19121f5 100644 --- a/include/zbxserver.h +++ b/include/zbxserver.h @@ -78,7 +78,8 @@ int substitute_simple_macros_unmasked(const zbx_uint64_t *actionid, const DB_EVE const DB_ALERT *alert, const DB_ACKNOWLEDGE *ack, const char *tz, char **data, int macro_type, char *error, int maxerrlen); -void evaluate_expressions(zbx_vector_ptr_t *triggers); +void evaluate_expressions(zbx_vector_ptr_t *triggers, const zbx_vector_uint64_t *history_itemids, + const DC_ITEM *history_items, const int *history_errcodes); void prepare_triggers(DC_TRIGGER **triggers, int triggers_num); void zbx_format_value(char *value, size_t max_len, zbx_uint64_t valuemapid, |