Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktors Tjarve <viktors.tjarve@zabbix.com>2016-05-02 13:18:13 +0300
committerViktors Tjarve <viktors.tjarve@zabbix.com>2016-05-02 13:18:13 +0300
commite78c8abff637d85fc17f64b74e7230c40047899f (patch)
tree42bd1e95bf46cb5c3c1cf1256fc25fbe91affe1b
parent57db8cc906048ca08b320c4333ab8104b384b5c0 (diff)
.......PS. [ZBX-6563] fixed potential incorrect data from icmppongsec item with low latency hosts;
introduced ZBX_FLOAT_PRECISION definition [merge ^/branches/3.0 -c r59839]
-rw-r--r--ChangeLog1
-rw-r--r--include/sysinfo.h2
-rw-r--r--src/libs/zbxsysinfo/simple/simple.c5
-rw-r--r--src/zabbix_server/pinger/pinger.c4
4 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index afa1d6f040c..843ad76b8fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ A.F....... [ZBX-1357] updated Chinese (China), Chinese (Taiwan), Czech, English
A.F.....S. [ZBXNEXT-3135] removed id field from history text and log tables (wiper, Sasha)
Bug fixes:
+.......PS. [ZBX-6563] fixed potential incorrect data from icmppongsec item with low latency hosts (viktors)
........S. [ZBX-3823] improved validation and error messaging when history, discovery, autoregistration and host availability data sent by passive and active proxies are processed on server (gleb)
A......... [ZBX-10030] fixed API action update method request with only "actionid" property (Cemeris)
..F....... [ZBX-9972] changed SERVICE_SLA constant to match database default goodsla value (Cemeris)
diff --git a/include/sysinfo.h b/include/sysinfo.h
index 69e6b82e694..f0338fe120c 100644
--- a/include/sysinfo.h
+++ b/include/sysinfo.h
@@ -127,6 +127,8 @@ while (0)
void *get_result_value_by_type(AGENT_RESULT *result, int require_type);
+#define ZBX_FLOAT_PRECISION 0.0001
+
extern int CONFIG_ENABLE_REMOTE_COMMANDS;
extern int CONFIG_LOG_REMOTE_COMMANDS;
extern int CONFIG_UNSAFE_USER_PARAMETERS;
diff --git a/src/libs/zbxsysinfo/simple/simple.c b/src/libs/zbxsysinfo/simple/simple.c
index 510f851030d..262731b634b 100644
--- a/src/libs/zbxsysinfo/simple/simple.c
+++ b/src/libs/zbxsysinfo/simple/simple.c
@@ -445,7 +445,10 @@ int check_service(AGENT_REQUEST *request, const char *default_addr, AGENT_RESULT
if (0 != value_int)
{
check_time = zbx_time() - check_time;
- check_time = MAX(check_time, 0.0001);
+
+ if (ZBX_FLOAT_PRECISION > check_time)
+ check_time = ZBX_FLOAT_PRECISION;
+
SET_DBL_RESULT(result, check_time);
}
else
diff --git a/src/zabbix_server/pinger/pinger.c b/src/zabbix_server/pinger/pinger.c
index ae63db7b8aa..1e1fa83f0a5 100644
--- a/src/zabbix_server/pinger/pinger.c
+++ b/src/zabbix_server/pinger/pinger.c
@@ -181,6 +181,10 @@ static void process_values(icmpitem_t *items, int first_index, int last_index, Z
value_dbl = (0 != host->rcv ? host->sum / host->rcv : 0);
break;
}
+
+ if (0 < value_dbl && ZBX_FLOAT_PRECISION > value_dbl)
+ value_dbl = ZBX_FLOAT_PRECISION;
+
process_value(item->itemid, NULL, &value_dbl, ts, SUCCEED, NULL);
break;
case ICMPPINGLOSS: