diff options
author | Dmitry Borovikov <git-no-replydmitry@zabbix.com> | 2009-08-10 17:50:01 +0400 |
---|---|---|
committer | Dmitry Borovikov <git-no-replydmitry@zabbix.com> | 2009-08-10 17:50:01 +0400 |
commit | 712764362c9a5c60456b0a176b830faa3aa88537 (patch) | |
tree | ab7d00ac0f848b622a2440b30270bda2ffd672ec /include | |
parent | c2d836594c66d3873f8eb45ecbe817115df2362d (diff) |
- [DEV-416] new simple check `icmppingloss' added; ICMP ckecks now support additional parameters (Dmitry)
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 2 | ||||
-rw-r--r-- | include/zbxicmpping.h | 38 |
2 files changed, 33 insertions, 7 deletions
diff --git a/include/common.h b/include/common.h index a6cc2718e8c..aa2049c3412 100644 --- a/include/common.h +++ b/include/common.h @@ -377,7 +377,7 @@ typedef enum /* Special item key used for ICMP pings */ #define SERVER_ICMPPING_KEY "icmpping" /* Special item key used for ICMP ping latency */ -#define SERVER_ICMPPINGSEC_KEY "icmppingsec" +/*#define SERVER_ICMPPINGSEC_KEY "icmppingsec"*/ /*not used, since using `SERVER_ICMPPING_KEY' with `like'(SQL)*/ /* Special item key used for internal ZABBIX log */ #define SERVER_ZABBIXLOG_KEY "zabbix[log]" diff --git a/include/zbxicmpping.h b/include/zbxicmpping.h index 8c2d844fc18..6f90d3e24a8 100644 --- a/include/zbxicmpping.h +++ b/include/zbxicmpping.h @@ -20,13 +20,39 @@ #include "common.h" #include "db.h" -#define ZBX_FPING_HOST struct zbx_fipng_host +#define ZBX_FPING_HOST struct zbx_fping_host ZBX_FPING_HOST { - char addr[HOST_ADDR_LEN_MAX]; - int useip; - zbx_uint64_t alive; - double sec; + char *addr; + double min, avg, max; + int rcv; }; -int do_ping(ZBX_FPING_HOST *hosts, int hosts_count, char *error, int max_error_len); +int do_ping(ZBX_FPING_HOST *hosts, int hosts_count, int count, int interval, int size, int timeout, char *error, int max_error_len); + +typedef enum +{ + ICMPPING = 0, + ICMPPINGSEC, + ICMPPINGLOSS +} icmpping_t; + +typedef enum +{ + ICMPPINGSEC_MIN = 0, + ICMPPINGSEC_AVG, + ICMPPINGSEC_MAX +} icmppingsec_type_t; + +typedef struct +{ + int count; + int interval; + int size; + int timeout; + zbx_uint64_t itemid; + char *addr; + icmpping_t icmpping; + icmppingsec_type_t type; +} icmpitem_t; + |