diff --git a/src/libs/zbxcachehistory/cachehistory.c b/src/libs/zbxcachehistory/cachehistory.c index c265096db09..19da3feccfe 100644 --- a/src/libs/zbxcachehistory/cachehistory.c +++ b/src/libs/zbxcachehistory/cachehistory.c @@ -3378,6 +3378,7 @@ int zbx_hc_is_itemid_in(zbx_uint64_t itemid) UNLOCK_CACHE; +zabbix_log(LOG_LEVEL_CRIT, "%s(): %s", __func__, (SUCCCEED == res)? "item found in history cache" : "item NOT found in history cache"); return res; } diff --git a/src/libs/zbxcachevalue/valuecache.c b/src/libs/zbxcachevalue/valuecache.c index 2bbc6e0d62d..26d15a2f4cc 100644 --- a/src/libs/zbxcachevalue/valuecache.c +++ b/src/libs/zbxcachevalue/valuecache.c @@ -2522,9 +2522,13 @@ int zbx_vc_add_values(zbx_vector_dc_history_ptr_t *history, int *ret_flush, int int i; zbx_dc_history_t *h; +zabbix_log(LOG_LEVEL_CRIT, "In zbx_vc_add_values()"); if (SUCCEED != zbx_history_add_values(history, ret_flush, config_history_storage_pipelines)) return FAIL; +zabbix_log(LOG_LEVEL_CRIT, "sleeping 10 sec after zbx_history_add_values(), before inserting data into value cache"); +zbx_sleep(10); + if (ZBX_VC_DISABLED == vc_state) return SUCCEED; @@ -2579,7 +2583,7 @@ int zbx_vc_add_values(zbx_vector_dc_history_ptr_t *history, int *ret_flush, int } UNLOCK_CACHE; - +zabbix_log(LOG_LEVEL_CRIT, "End zbx_vc_add_values()"); return SUCCEED; } @@ -2612,7 +2616,7 @@ int zbx_vc_get_values(zbx_uint64_t itemid, unsigned char value_type, zbx_vector_ zbx_vc_item_t *item, new_item; int ret = FAIL, cache_used = 1; - zabbix_log(LOG_LEVEL_DEBUG, "In %s() itemid:" ZBX_FS_UI64 " value_type:%d count:%d period:%d end_timestamp" + zabbix_log(LOG_LEVEL_CRIT, "In %s() itemid:" ZBX_FS_UI64 " value_type:%d count:%d period:%d end_timestamp" " '%s'", __func__, itemid, value_type, count, seconds, zbx_timespec_str(ts)); if (ITEM_VALUE_TYPE_BIN == value_type) @@ -2658,7 +2662,7 @@ out: UNLOCK_CACHE; - zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%s count:%d cached:%d", + zabbix_log(LOG_LEVEL_CRIT, "End of %s():%s count:%d cached:%d", __func__, zbx_result_string(ret), values->values_num, cache_used); return ret; diff --git a/src/libs/zbxexpression/evalfunc.c b/src/libs/zbxexpression/evalfunc.c index 860738eddf8..1d6476570db 100644 --- a/src/libs/zbxexpression/evalfunc.c +++ b/src/libs/zbxexpression/evalfunc.c @@ -1656,7 +1656,7 @@ static int evaluate_NODATA(zbx_variant_t *value, const zbx_dc_evaluate_item_t *i char *arg2 = NULL; zbx_proxy_suppress_t nodata_win; - zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__); + zabbix_log(LOG_LEVEL_CRIT, "In %s()", __func__); zbx_history_record_vector_create(&values); @@ -1702,6 +1702,7 @@ static int evaluate_NODATA(zbx_variant_t *value, const zbx_dc_evaluate_item_t *i 1 == values.values_num) { zbx_variant_set_dbl(value, 0); +zabbix_log(LOG_LEVEL_CRIT, "evaluate_NODATA(): setting to 0, NODATA trigger will not fire"); } else { @@ -1724,10 +1725,12 @@ static int evaluate_NODATA(zbx_variant_t *value, const zbx_dc_evaluate_item_t *i SUCCEED == zbx_hc_is_itemid_in(item->itemid))) { *error = zbx_strdup(*error, "historical data transfer from proxy is still in progress"); +zabbix_log(LOG_LEVEL_CRIT, "evaluate_NODATA(): historical data transfer from proxy is still in progress"); goto out; } zbx_variant_set_dbl(value, 1); +zabbix_log(LOG_LEVEL_CRIT, "evaluate_NODATA(): setting to 1. YES, NODATA trigger WILL FIRE"); if (0 != item->proxyid && 0 != lazy) { diff --git a/src/libs/zbxtrapper/trapper.c b/src/libs/zbxtrapper/trapper.c index e3f37f8f03f..693b7280462 100644 --- a/src/libs/zbxtrapper/trapper.c +++ b/src/libs/zbxtrapper/trapper.c @@ -1149,7 +1149,7 @@ static int process_trap(zbx_socket_t *sock, char *s, ssize_t bytes_received, zbx zbx_rtrim(s, " \r\n"); - zabbix_log(LOG_LEVEL_DEBUG, "trapper got '%s'", s); + zabbix_log(LOG_LEVEL_CRIT, "trapper got '%s'", s); if ('{' == *s) /* JSON protocol */ { diff --git a/src/zabbix_server/cachehistory/cachehistory_server.c b/src/zabbix_server/cachehistory/cachehistory_server.c index 8f00de8ab2e..5d98faf400f 100644 --- a/src/zabbix_server/cachehistory/cachehistory_server.c +++ b/src/zabbix_server/cachehistory/cachehistory_server.c @@ -830,6 +830,7 @@ static int add_history(zbx_dc_history_t *history, int history_num, zbx_vector_dc zbx_vector_dc_history_ptr_append(history_values, h); } +zabbix_log(LOG_LEVEL_CRIT, "add_history(): history_num:%d history_values->values_num:%d", history_num, (int)(history_values->values_num)); if (0 != history_values->values_num) ret = zbx_vc_add_values(history_values, ret_flush, config_history_storage_pipelines);