summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-08 20:48:39 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-08 20:48:39 (GMT)
commit9426b9a33828c19188d6928ac862dd3179e44e68 (patch)
tree9bb54f3a75701df935cc01e29ca4c9487842eff8
parentc011d010ee322f7fab8d0946b34caf443ce14438 (diff)
downloadmonitoring-plugins-9426b9a33828c19188d6928ac862dd3179e44e68.tar.gz
Initialise threshold variables properly
-rw-r--r--plugins-root/check_icmp.c17
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 **/
236static struct rta_host **table, *cursor, *list; 236static struct rta_host **table, *cursor, *list;
237static threshold crit = {80, 500000}, warn = {40, 200000}; 237
238static threshold crit = {
239 .pl = 80,
240 .rta = 500000,
241 .jitter = 0.0,
242 .mos = 0.0,
243 .score = 0.0
244};
245static threshold warn = {
246 .pl = 40,
247 .rta = 200000,
248 .jitter = 0.0,
249 .mos = 0.0,
250 .score = 0.0
251};
252
238static int mode, protocols, sockets, debug = 0, timeout = 10; 253static int mode, protocols, sockets, debug = 0, timeout = 10;
239static unsigned short icmp_data_size = DEFAULT_PING_DATA_SIZE; 254static unsigned short icmp_data_size = DEFAULT_PING_DATA_SIZE;
240static unsigned short icmp_pkt_size = DEFAULT_PING_DATA_SIZE + ICMP_MINLEN; 255static unsigned short icmp_pkt_size = DEFAULT_PING_DATA_SIZE + ICMP_MINLEN;