# Watcher webhook outlook ssl exception

**URL:** <https://discuss.elastic.co/t/watcher-webhook-outlook-ssl-exception/116114>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [January 18, 2018, 6:14pm UTC](https://discuss.elastic.co/t/watcher-webhook-outlook-ssl-exception/116114 "2018-01-18T18:14:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AbdulH](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@AbdulH](https://discuss.elastic.co/u/AbdulH)\
**Post date:** [January 18, 2018, 6:14pm UTC](https://discuss.elastic.co/t/watcher-webhook-outlook-ssl-exception/116114/1 "2018-01-18T18:14:06Z")

</div>

I've getting the following error trying to configure the Elasticsearch watcher with webhooks to connect to Microsoft Teams:

```
s_s_l_exception:Unrecognized SSL message, plaintext connection? 

```

This is my config:

```
"metadata" : {
  "color" : "green"
 },
"trigger" : {
 "schedule" : {
  "interval" : "1m"
 }
},
"input" : {
 "http" : {
  "request" : {
   "host" : "....",
   "port" : 9200,
   "path" : "/_cluster/health"
  }
 }
},
"condition" : {
 "compare" : {
  "ctx.payload.status" : { "eq" : "green" }
 }
},
"actions" : {
 "teams_webhook" : {
  "webhook" : {
   "method" : "POST",
   "url" : "https://outlook.office.com/webhook/...",
   "headers" : {
    "Content-Type" : "application/json",
    "Accept" : "application/json"
  },
  "proxy" : {
   "host" : "zz.zzz.com",
   "port" : 8080
  },
  "body" : "{{#toJson}}{{ctx.payload.hits.total}}{{/toJson}}}"
 }
}
}

```

I've tried to disable ssl authentication as best I can through elasticsearch.yml though I get the same issue:

```
xpack.http.ssl.verification_mode: none
xpack.ssl.verification_mode: none
xpack.http.proxy.host: zzz.zzzz.zzzz
xpack.http.proxy.port: 8080
xpack.ssl.client_authentication: none

```

The input and conditions return a status of 200 and success though the actions section returns an exception "s\_s\_l\_exception":"Unrecognized SSL message, plaintext connection?" which I suspect is caused by the proxy. I've managed to successfully post to teams using the proxy with curl and postman so I'm struggling to find a solution. I've managed to use the host:8080 proxy host port to send to Microsoft teams with curl and postman by setting the https proxy within postman and using export https\_proxy=http://zzz.zzz.zzz:8080 alongside curl.

Does anyone know what the issue is with my config or how I'm configuring the webhook?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 19, 2018, 3:41pm UTC](https://discuss.elastic.co/t/watcher-webhook-outlook-ssl-exception/116114/2 "2018-01-19T15:41:48Z")

</div>

Hey,

yes, this is a bug on our side, if the scheme of the HTTP proxy is different to the scheme of the request, in this case HTTP for the proxy and HTTPS for the request.

We are working on a fix.

--Alex

---

<div class="post-metadata">

**Author:** ![amruta.mohite](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@amruta.mohite](https://discuss.elastic.co/u/amruta.mohite)\
**Post date:** [January 23, 2018, 11:44am UTC](https://discuss.elastic.co/t/watcher-webhook-outlook-ssl-exception/116114/3 "2018-01-23T11:44:39Z")

</div>

What it means ?  
I am also trying to send notification using webhook url and I am unable to do it.  
Its giving me error : SSLHandshakeException[Received fatal alert: handshake\_failure]  
Is there any workaround for the same?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 20, 2018, 11:44am UTC](https://discuss.elastic.co/t/watcher-webhook-outlook-ssl-exception/116114/4 "2018-02-20T11:44:42Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
