forked from infra/ansible
Zabbix: Try to improve SSL check to handle timeouts from whatcanido
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
This commit is contained in:
parent
709f7a12c4
commit
76e6ffd412
2 changed files with 6 additions and 4 deletions
|
|
@ -12,7 +12,6 @@
|
|||
tags:
|
||||
- zabbix_agent
|
||||
- zabbix_api
|
||||
- pagure
|
||||
block:
|
||||
- name: Create {{ item.name }} cert age item
|
||||
community.zabbix.zabbix_item:
|
||||
|
|
@ -25,9 +24,12 @@
|
|||
units: 'days'
|
||||
timeout: '10s'
|
||||
interval: '12h'
|
||||
preprocessing:
|
||||
- type: check_unsupported
|
||||
error_handler: set_custom_error_message
|
||||
error_handler_params: 'failed to execute zext_ssl_cert.sh'
|
||||
params: '-1' # corresponds to 'any value' in the UI params
|
||||
tags:
|
||||
- tag: application
|
||||
value: pagure
|
||||
- tag: component
|
||||
value: ssl
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ EXPIRY=$(echo | timeout 5 openssl s_client -servername $HOST -connect $HOST:$POR
|
|||
openssl x509 -noout -enddate 2>/dev/null | cut -d= -f2)
|
||||
|
||||
if [ -z "$EXPIRY" ]; then
|
||||
echo 0
|
||||
echo "timeout connecting to $HOST"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue