mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
avoid blocking in ssl_
Just in case there is a firewall dropping packages, this plugin would block until the plugin timeout is reached. This change introduces the possibility to configure a much lower individual timeout.
This commit is contained in:
parent
bd727d75f9
commit
f6ea58d5f5
1 changed files with 2 additions and 1 deletions
3
plugins/ssl/ssl_
Executable file → Normal file
3
plugins/ssl/ssl_
Executable file → Normal file
|
@ -15,6 +15,7 @@ To set warning and critical levels do like this:
|
||||||
|
|
||||||
[ssl_*]
|
[ssl_*]
|
||||||
env.warning 30:
|
env.warning 30:
|
||||||
|
env.max_time 5
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cert=$(echo "" | openssl s_client -CApath /etc/ssl/certs -servername "${SITE}" -connect "${SITE}:${PORT}" 2>/dev/null);
|
cert=$(timeout "${max_time:-5}" openssl s_client -CApath /etc/ssl/certs -servername "${SITE}" -connect "${SITE}:${PORT}" 2>/dev/null < /dev/null);
|
||||||
|
|
||||||
days_left=$(echo "$cert" | parse_valid_days_from_certificate)
|
days_left=$(echo "$cert" | parse_valid_days_from_certificate)
|
||||||
[ -n "$days_left" ] || days_left="U"
|
[ -n "$days_left" ] || days_left="U"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue