check_logfiles: 3.7.5.1
[omd.git] / packages / monitoring-plugins / patches / 0001-check-icmp-allows-pl-of-101.dif
bloba2ab46971dfdf293e8f77c27c9f59471f55b5476
1 Only in monitoring-plugins-2.0: config.log
2 diff -ru monitoring-plugins-2.0.orig/plugins-root/check_icmp.c monitoring-plugins-2.0/plugins-root/check_icmp.c
3 --- monitoring-plugins-2.0.orig/plugins-root/check_icmp.c       2014-07-06 19:55:03.000000000 +0200
4 +++ monitoring-plugins-2.0/plugins-root/check_icmp.c    2014-09-11 13:58:42.693502323 +0200
5 @@ -940,7 +940,9 @@
6                          * conspicuosly as missing entries in perfparse and cacti */
7                         pl = 100;
8                         rta = 0;
9 -                       status = STATE_CRITICAL;
10 +                       if (pl >= crit.pl)
11 +                            status = STATE_CRITICAL;
13                         /* up the down counter if not already counted */
14                         if(!(host->flags & FLAG_LOST_CAUSE) && targets_alive) targets_down++;
15                 }
16 @@ -964,7 +966,7 @@
17                 host = host->next;
18         }
19         /* this is inevitable */
20 -       if(!targets_alive) status = STATE_CRITICAL;
21 +       if(!targets_alive && crit.pl <= 100) status = STATE_CRITICAL;
22         if(min_hosts_alive > -1) {
23                 if(hosts_ok >= min_hosts_alive) status = STATE_OK;
24                 else if((hosts_ok + hosts_warn) >= min_hosts_alive) status = STATE_WARNING;
25 @@ -980,7 +982,8 @@
26                 }
27                 i++;
28                 if(!host->icmp_recv) {
29 -                       status = STATE_CRITICAL;
30 +                       if (pl >= crit.pl)
31 +                            status = STATE_CRITICAL;
32                         if(host->flags & FLAG_LOST_CAUSE) {
33                                 printf("%s: %s @ %s. rta nan, lost %d%%",
34                                            host->name,
35 @@ -1246,7 +1249,7 @@
36         if(!th->rta) return -1;
38         if(th->rta > MAXTTL * 1000000) th->rta = MAXTTL * 1000000;
39 -       if(th->pl > 100) th->pl = 100;
40 +       if(th->pl > 101) th->pl = 101;
42         return 0;
43  }
44 Only in monitoring-plugins-2.0/plugins-root: check_icmp.c.orig