<p>Big update on this and solution <em>nohack</em> <br>
So how do you check a host with SNI ? like this :<br>
openssl s_client -connect <a href="http://www.example.com:443">www.example.com:443</a> -servername <a href="http://www.example.com">www.example.com</a> <br>
works perfectly. And this made me think.</p>

<p>now back to the icinga1/2/nagios/etc check_http execution.<br>
this is the correct way to use the command to check a webhost with sni <br>
check_http -H <a href="http://www.example.com">www.example.com</a> -S --sni <br>
HTTP OK: HTTP/1.1 200 OK - 13667 bytes in 1.031 second response time |time=1.031097s;;;0.000000 size=13667B;;;0<br>
Now, -H stands for vhost but i guess in the context of sni it's somewhat the same thing tho the documentation should be updated.</p>

<p>Here is a host object definition for such a check </p>

<h1>sequence from hosts.conf </h1>

<p>[...]<br>
object Host <a href="http://www.example.com">www.example.com</a> { <br>
 address <a href="http://www.example.com">www.example.com</a> <br>
 vars.http_vhost = "www.example.com"<br>
 vars.http_sni = "true"<br>
 vars.server_type = "Web Servers" <br>
 vars[...] # any other required on-setup vars <br>
}<br>
[...]</p>

<p>and the check is simple . </p>

<h1>sequence from a customservicechecks.conf <em>justanexamplename</em>
</h1>

<p>[...]<br>
apply Service "https" {<br>
        import "generic-service"<br>
        check_command = "http"<br>
        vars.http_ssl = "true"<br>
       assign where host.vars.server_type == "Web Servers" <br>
}<br>
[...]</p>

<p>Now i don't know about nagios 1/2/3/4, this is icinga2 syntax but this should be adaptable to nagios configs. </p>

<p>Yay and big thanks to Mr. Rob Stradling at openssl who (although unrelated to nagios/icinga) gave me a very important hint. <br>
Rock on \m/</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br><a href="https://github.com/monitoring-plugins/monitoring-plugins/issues/1338#issuecomment-140439377">Reply to this email on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFQl2Wg2U4p5HGYG2LmkJvHShYMtzye8ks5oyDZwgaJpZM4EXI0C.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/monitoring-plugins/monitoring-plugins/issues/1338#issuecomment-140439377"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>