1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

improvements for tcp_reachability

- update documentation "See Also"
- unify error messages
- check max_time for validity
This commit is contained in:
Klaus Sperner 2021-09-17 17:22:02 +02:00
parent 6469336235
commit 73fcf8782b

View file

@ -108,9 +108,10 @@ timeout
There are a couple of ping plugins in There are a couple of ping plugins in
L<https://github.com/munin-monitoring/contrib/tree/master/plugins/ping>. Many L<https://github.com/munin-monitoring/contrib/tree/master/plugins/ping>. Many
of these require additional software to be installed. The plugin of these perform ICMP pings. The plugin
L<multi_tcp_ping|https://gallery.munin-monitoring.org/plugins/munin-contrib/multi_tcp_ping/> L<multi_tcp_ping|https://gallery.munin-monitoring.org/plugins/munin-contrib/multi_tcp_ping/>
provides timing statistics similar to this plugin. tests TCP ports and provides timing statistics similar to this plugin, but it
does not provide a reachability graph and it does not define any alarm limits.
=head1 AUTHOR =head1 AUTHOR
@ -199,11 +200,16 @@ short_label=${short_label:-"false"}
for target in $targets; do for target in $targets; do
if [[ ! "$target" =~ $host_port_regex ]]; then if [[ ! "$target" =~ $host_port_regex ]]; then
>&2 echo "Invalid configuration: target $target is not a valid 'host/port' combination" >&2 echo "Invalid configuration: target $target is not a valid 'host/port' combination. Aborting."
exit 1 exit 1
fi fi
done done
if [[ ! "$max_time" =~ ^[0-9]+$ ]]; then
>&2 echo "Invalid configuration: max_time $max_time must contain only digits. Aborting."
exit 1
fi
if [[ "$1" == "config" ]]; then if [[ "$1" == "config" ]]; then
echo 'multigraph tcp_reachability' echo 'multigraph tcp_reachability'
echo 'graph_args --base 1000 --lower-limit -0.25 --upper-limit 1.25 --rigid' echo 'graph_args --base 1000 --lower-limit -0.25 --upper-limit 1.25 --rigid'