diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-08 20:48:39 (GMT) |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-08 20:48:39 (GMT) |
commit | 9426b9a33828c19188d6928ac862dd3179e44e68 (patch) | |
tree | 9bb54f3a75701df935cc01e29ca4c9487842eff8 | |
parent | c011d010ee322f7fab8d0946b34caf443ce14438 (diff) | |
download | monitoring-plugins-9426b9a33828c19188d6928ac862dd3179e44e68.tar.gz |
Initialise threshold variables properly
-rw-r--r-- | plugins-root/check_icmp.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index e96fa3e..abc5595 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -234,7 +234,22 @@ extern char **environ; | |||
234 | 234 | ||
235 | /** global variables **/ | 235 | /** global variables **/ |
236 | static struct rta_host **table, *cursor, *list; | 236 | static struct rta_host **table, *cursor, *list; |
237 | static threshold crit = {80, 500000}, warn = {40, 200000}; | 237 | |
238 | static threshold crit = { | ||
239 | .pl = 80, | ||
240 | .rta = 500000, | ||
241 | .jitter = 0.0, | ||
242 | .mos = 0.0, | ||
243 | .score = 0.0 | ||
244 | }; | ||
245 | static threshold warn = { | ||
246 | .pl = 40, | ||
247 | .rta = 200000, | ||
248 | .jitter = 0.0, | ||
249 | .mos = 0.0, | ||
250 | .score = 0.0 | ||
251 | }; | ||
252 | |||
238 | static int mode, protocols, sockets, debug = 0, timeout = 10; | 253 | static int mode, protocols, sockets, debug = 0, timeout = 10; |
239 | static unsigned short icmp_data_size = DEFAULT_PING_DATA_SIZE; | 254 | static unsigned short icmp_data_size = DEFAULT_PING_DATA_SIZE; |
240 | static unsigned short icmp_pkt_size = DEFAULT_PING_DATA_SIZE + ICMP_MINLEN; | 255 | static unsigned short icmp_pkt_size = DEFAULT_PING_DATA_SIZE + ICMP_MINLEN; |