summaryrefslogtreecommitdiffstats
path: root/plugins-root/check_icmp.c
AgeCommit message (Collapse)AuthorFilesLines
7 dayscheck_icmp: Apply clang-format againrefs/pull/2028/headLorenz Kästle1-25/+34
2024-10-15check_icmp: clang-formatRincewindsHat1-1/+7
2024-10-15check_icmp: Update copyrightRincewindsHat1-2/+2
2024-10-15check_icmp: Properly mark function with void inputRincewindsHat1-1/+1
2024-10-15check_icmp: Declare internal variables staticRincewindsHat1-8/+8
2024-10-15check_icmp: clang-formatRincewindsHat1-783/+742
2024-03-01check_icmp: keep performance data order in case of none-reachable hostsSven Nierlein1-30/+50
For responding hosts nothing changes: ./check_icmp -H 10.0.0.1 OK - 10.0.0.1 rta 0.336ms lost 0%|rta=0.336ms;200.000;500.000;0; rtmax=0.471ms;;;; rtmin=0.000ms;;;; pl=0%;40;80;0;100 In case the host is down, the performance data now contain 'U' according to: https://www.monitoring-plugins.org/doc/guidelines.html#AEN201 Old: ./check_icmp -H 10.0.0.99 CRITICAL - 10.0.0.99: Host unreachable @ 10.0.1.138. rta nan, lost 100%|pl=100%;40;80;0;100 Old: ./check_icmp -H 10.0.0.99 CRITICAL - 10.0.0.99: Host unreachable @ 10.0.1.138. rta nan, lost 100%|rta=U;;;; rtmax=U;;;; rtmin=U;;;; pl=100%;40;80;0;100 This confuses some performance graphing tools, ex.: pnp. Signed-off-by: Sven Nierlein <sven@consol.de>
2023-10-12Fix spelling stuffrefs/pull/1928/headRincewindsHat1-1/+1
2023-10-12Add some more comments about the MOS scoreRincewindsHat1-0/+22
2023-10-09Even more code formatting and cleanupRincewindsHat1-21/+26
2023-10-08Do some more formattingRincewindsHat1-107/+107
2023-10-08Remove preprocessor macroRincewindsHat1-6/+5
2023-10-08Do some code formattingRincewindsHat1-16/+17
2023-10-08More consequent booleansRincewindsHat1-2/+2
2023-10-08fix unused variables compiler warningRincewindsHat1-0/+2
2023-10-08fix sign compare compiler warningsRincewindsHat1-2/+2
2023-10-08Initialise threshold variables properlyRincewindsHat1-1/+16
2023-10-07Fix typoRincewindsHat1-1/+1
2023-10-07Refactor new threshold parserRincewindsHat1-37/+45
2023-10-07Do some actual error checking on the threshold parserRincewindsHat1-6/+32
2023-10-06Remove useless return after crashRincewindsHat1-1/+0
2023-10-06Change function type of get_thresholds to better reflect the options and ↵RincewindsHat1-7/+14
describe it in general
2023-10-06Update commentRincewindsHat1-2/+2
2023-10-06Refactor get_threshold2 to be barely understandableRincewindsHat1-35/+65
2023-10-06check mallocDanijel Tasov1-0/+4
2023-10-06do not introduce new ints as boolsDanijel Tasov1-14/+16
2023-10-04unnecessary spaceDanijel Tasov1-1/+1
Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-10-04readability improvementsDanijel Tasov1-3/+21
Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-10-04remove sun ifdefDanijel Tasov1-5/+0
my be readded later with proper comments Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-10-04fix host count on when checking multiple hostsDanijel Tasov1-21/+24
2023-10-04adjust check_icmp testsDanijel Tasov1-1/+1
2023-09-28update-poDanijel Tasov1-1/+1
Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-09-27cleanup more merge debrisDanijel Tasov1-8/+3
Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-09-26Add some spaces to the outputDanijel Tasov1-19/+19
needed if multiple modes are used at once Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-09-26fixed commentDanijel Tasov1-1/+1
Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-09-25Fix spelingDanijel Tasov1-1/+1
Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-09-25Fix compile errorsDanijel Tasov1-8/+6
Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-09-25exit UNKNOWN on -VDanijel Tasov1-1/+1
Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-09-23fix merge errorDanijel Tasov1-1/+0
Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-09-23Merge branch 'jitter-orig' into merge-jitterDanijel Tasov1-31/+377
2023-09-23remove root checkDanijel Tasov1-3/+0
We can perfectly do icmp without root by using capabalities. So, instead of doing unsufficient checks beforehand, we just try and fail if it doesn't work. Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-04-17Refix spelling issuesRincewindsHat1-1/+1
2023-04-17Fixes for -WuninitializedRincewindsHat1-0/+1
2023-04-17Fixes for -Wunused-parametersRincewindsHat1-0/+4
2023-04-14Fix a lot of typos reported by codespellrefs/pull/1864/headJan Wagner1-1/+1
2023-02-19Merge branch 'master' into check_icmp_cleanuprefs/pull/1807/headRincewindsHat1-8/+8
2023-02-19check_icmp: Fix compiler warningRincewindsHat1-1/+1
This fixes a compiler warning which complains about an uninitialized value for a variable which is then returned. This had no real world impact, since the program would crash in the branch where result is not set. The variable is initialized to "-1" which would be the error for inet_pton.
2023-02-19check_icmp: Fix compiler warningRincewindsHat1-2/+3
This fixes a compiler warning with no real world impact. The compiler complains about a missing return, which is correct, but in that scenario the program would crash anyways, so this has no impact.
2022-11-29check_icmp: fix parsing help/version long optionsAksel Sjögren1-8/+8
Fix parsing of the long options --help and --version. The special handling must be done before calling getopt(). This fixes erroneous output like: ./check_icmp --version ./check_icmp: invalid option -- '-' ./check_icmp: invalid option -- 'e' ./check_icmp: invalid option -- 'r' ./check_icmp: invalid option -- '-' ./check_icmp: invalid option -- 'e' ./check_icmp: invalid option -- 'r' Signed-off-by: Aksel Sjögren <asjogren@itrsgroup.com>
2022-11-04Replace DBL_MAX with INFITY to check if value was setRincewindsHat1-2/+3