Sorry, that example didn't have the cert age, but hopefully close enough to get you going (?)

On 02/09/2018 11:47 AM, Christopher Cox wrote:
On 02/09/2018 11:28 AM, Graham Dunn wrote:
Hi,

I'm using the 1.4.0p24 CRE version

I have some hosts that I want to check the SSL cert age, so in WATO, I've configured the active http check as follows

Service check command: check_mk_active-http!'-I' '$_HOSTADDRESS_4$' '-C' '14,7' '--sni'

If I run that via cli on the monitoring host:

OMD[it]:~$ /opt/omd/versions/1.4.0p24.cre/lib/nagios/plugins/check_http '-I' 'www.myexample.com <http://www.myexample.com>' '-C' '14,7' '--sni'
CRITICAL - Cannot make SSL connection.

however, if I change the -I argument to -H, it works:

OMD[it]:~$ /opt/omd/versions/1.4.0p24.cre/lib/nagios/plugins/check_http -H 'www.myexample.com <http://www.myexample.com>' '-C' '14,7' '--sni' OK - Certificate 'www.myexample.com <http://www.myexample.com>' will expire on Mon 07 May 2018 06:47:13 PM GMT +0000.

How can I get that '-H' parameter in the check via WATO? Selecting the "Check Certificate of different IP / DNS Name " seems to add it, and I've tried putting $_HOSTADDRESS_4$ in the field below, but no change, even though the check command looks like:

check_mk_active-http!'-H' '$_HOSTADDRESS_4$' '-C' '14,7' '--sni'

which matches my working command line.

Any ideas?

We've set these up WATO (web)  The mk rule entry ended up looking like:

active_checks['http'] = [
  ( (u'GitLab Login', {'ssl': 'auto', 'virthost': ('gitlab.example.com', False), 'uri': '/users/sign_in',
'auth': ('username', 'password')}), [], ['gitlab'] ),

How it looks under the web UI:
https://endlessnow.com/images/wato-active-http.png


_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Reply via email to