diff options
author | Lorenz Kästle <lorenz.kaestle@netways.de> | 2025-06-12 11:13:59 +0200 |
---|---|---|
committer | Lorenz Kästle <lorenz.kaestle@netways.de> | 2025-06-12 11:13:59 +0200 |
commit | 7247fc656a1f475159b7879cc3c3b798e03c1a33 (patch) | |
tree | 0dbcc41f97111b9713b8478409e8dc9dec7a0f37 /plugins/check_fping.d | |
parent | 88683af1da8baae6b252795ab5d85a48e9cd3e63 (diff) | |
download | monitoring-plugins-7247fc656a1f475159b7879cc3c3b798e03c1a33.tar.gz |
Implement new fping options for fping 5.2 and 5.3
fping 5.2 and 5.3 add some new useful command line options
which this commit add to check_fping.
These are:
* --fwmark - sets a firewall mark in the packages to make them
identifiable (fping 5.2)
* --icmp-timestamp - fping uses ICMP timestamp instead of ICMP
Echo (fping 5.2)
* --check-source - fping discards replies which originate not from
the target address (fping 5.2)
The fping release notes describe theses options ( https://github.com/schweikert/fping/releases )
in a little bit more detail.
Currently the help display for those options is only shown
when fping was available in the appropriate version during
compilation.
Diffstat (limited to 'plugins/check_fping.d')
-rw-r--r-- | plugins/check_fping.d/config.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/check_fping.d/config.h b/plugins/check_fping.d/config.h index a0697bf3..6d28382a 100644 --- a/plugins/check_fping.d/config.h +++ b/plugins/check_fping.d/config.h | |||
@@ -29,6 +29,21 @@ typedef struct { | |||
29 | bool cpl_p; | 29 | bool cpl_p; |
30 | int wpl; | 30 | int wpl; |
31 | bool wpl_p; | 31 | bool wpl_p; |
32 | |||
33 | // only available with fping version >= 5.2 | ||
34 | // for a given uint _fwmark_ fping sets _fwmark_ as a firewall mark | ||
35 | // in the pakets | ||
36 | unsigned int fwmark; | ||
37 | bool fwmark_set; | ||
38 | |||
39 | |||
40 | // only available with fping version >= 5.3 | ||
41 | // Setting icmp_timestamp tells fping to use ICMP Timestamp (ICMP type 13) instead | ||
42 | // of ICMP Echo | ||
43 | bool icmp_timestamp; | ||
44 | |||
45 | // Setting check_source lets fping discard replies which are not from the target address | ||
46 | bool check_source; | ||
32 | } check_fping_config; | 47 | } check_fping_config; |
33 | 48 | ||
34 | check_fping_config check_fping_config_init() { | 49 | check_fping_config check_fping_config_init() { |
@@ -53,6 +68,15 @@ check_fping_config check_fping_config_init() { | |||
53 | .cpl_p = false, | 68 | .cpl_p = false, |
54 | .wpl = 0, | 69 | .wpl = 0, |
55 | .wpl_p = false, | 70 | .wpl_p = false, |
71 | |||
72 | // only available with fping version >= 5.2 | ||
73 | .fwmark = 0, | ||
74 | .fwmark_set = false, // just to be deterministic | ||
75 | |||
76 | // only available with fping version >= 5.3 | ||
77 | .icmp_timestamp = false, | ||
78 | .check_source = false, | ||
79 | |||
56 | }; | 80 | }; |
57 | return tmp; | 81 | return tmp; |
58 | } | 82 | } |