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:

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' ' <>' '-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 ' <>' '-C' '14,7' '--sni' OK - Certificate ' <>' 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': ('', False), 'uri': '/users/sign_in',
'auth': ('username', 'password')}), [], ['gitlab'] ),

How it looks under the web UI:

checkmk-en mailing list
checkmk-en mailing list

Reply via email to