# Not able to send notifications to mattermost from x-pack watcher with Elastic search and Kibana version 5.6.0

**URL:** <https://discuss.elastic.co/t/not-able-to-send-notifications-to-mattermost-from-x-pack-watcher-with-elastic-search-and-kibana-version-5-6-0/116607>\
**Category:** Kibana\
**Created:** [January 23, 2018, 7:32am UTC](https://discuss.elastic.co/t/not-able-to-send-notifications-to-mattermost-from-x-pack-watcher-with-elastic-search-and-kibana-version-5-6-0/116607 "2018-01-23T07:32:36Z")\
**Posts on this page:** 5\
**Page:** 1

<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, 7:32am UTC](https://discuss.elastic.co/t/not-able-to-send-notifications-to-mattermost-from-x-pack-watcher-with-elastic-search-and-kibana-version-5-6-0/116607/1 "2018-01-23T07:32:36Z")

</div>

I am using x-pack for monitoring and sending alerts on elastic search logs. I am able to send email alerts using x-pack but not able to send notifications to mattermost, I am using webhook configurations.

```auto
"actions" : {
    "my_webhook" : {
      "webhook" : {
        "scheme": "https",
        "method" : "POST",
        "host" : "mylisteninghost",
        "port" : 443,
        "path" : "hooks/<hook_id>",
        "body" : "{\"message_type\": \"INFO\",\"monitoring_tool\":\"ElasticWatcher\",\"entity_id\": 123,\"entity_display_name\": \"hello Amruta1\",\"state_message\": \"ALERT\",\"text\":\"Hello amruta,test meassage from webhook url\"}",
         "headers" : {"Content-type": "application/json"}
      }
    }
}

```

Above are my configurations, please someone guide me with this.  
When I am running the same request with postman, its successful but not with x-pack watcher.  
With postman its sending notification with https scheme and with x-pack watcher with https its giving handshake failure error.  
Please respond someone.

---

<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 24, 2018, 8:51am UTC](https://discuss.elastic.co/t/not-able-to-send-notifications-to-mattermost-from-x-pack-watcher-with-elastic-search-and-kibana-version-5-6-0/116607/2 "2018-01-24T08:51:01Z")

</div>

Hey,

can you paste the full output of calling the [Execute Watch API](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/watcher-api-execute-watch.html) on this watch? Thank you!

--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 24, 2018, 12:12pm UTC](https://discuss.elastic.co/t/not-able-to-send-notifications-to-mattermost-from-x-pack-watcher-with-elastic-search-and-kibana-version-5-6-0/116607/3 "2018-01-24T12:12:50Z")

</div>

Here is output of execute command:

```auto
{
  "_id": "cluster_health_watch_ok_57c07aa4-fce1-42cf-8fcb-22b7a6b09c39-2018-01-24T12:09:51.609Z",
  "watch_record": {
    "watch_id": "cluster_health_watch_ok",
    "state": "executed",
    "status": {
      "state": {
        "active": true,
        "timestamp": "2018-01-24T12:09:49.681Z"
      },
      "last_checked": "2018-01-24T12:09:51.609Z",
      "last_met_condition": "2018-01-24T12:09:51.609Z",
      "actions": {
        "send_emails": {
          "ack": {
            "timestamp": "2018-01-24T12:09:51.609Z",
            "state": "ackable"
          },
          "last_execution": {
            "timestamp": "2018-01-24T12:09:51.609Z",
            "successful": true
          },
          "last_successful_execution": {
            "timestamp": "2018-01-24T12:09:51.609Z",
            "successful": true
          }
        },
        "my_webhook": {
          "ack": {
            "timestamp": "2018-01-24T12:09:49.681Z",
            "state": "awaits_successful_execution"
          },
          "last_execution": {
            "timestamp": "2018-01-24T12:09:51.609Z",
            "successful": false,
            "reason": "SSLHandshakeException[Received fatal alert: handshake_failure]"
          }
        }
      }
    },
    "trigger_event": {
      "type": "manual",
      "triggered_time": "2018-01-24T12:09:51.609Z",
      "manual": {
        "schedule": {
          "scheduled_time": "2018-01-24T12:09:51.609Z"
        }
      }
    },
    "input": {
      "http": {
        "request": {
          "scheme": "http",
          "host": "<elasticsearch-host>",
          "port": 9200,
          "method": "get",
          "path": "/_cluster/health",
          "params": {},
          "headers": {}
        }
      }
    },
    "condition": {
      "compare": {
        "ctx.payload.status": {
          "eq": "green"
        }
      }
    },
    "result": {
      "execution_time": "2018-01-24T12:09:51.609Z",
      "execution_duration": 266,
      "input": {
        "type": "http",
        "status": "success",
        "payload": {
          "number_of_pending_tasks": 0,
          "cluster_name": "testxpack",
          "active_shards": 40,
          "active_primary_shards": 20,
          "unassigned_shards": 0,
          "delayed_unassigned_shards": 0,
          "timed_out": false,
          "relocating_shards": 0,
          "_headers": {
            "content-length": [
              "388"
            ],
            "content-type": [
              "application/json; charset=UTF-8"
            ]
          },
          "initializing_shards": 0,
          "task_max_waiting_in_queue_millis": 0,
          "number_of_data_nodes": 3,
          "number_of_in_flight_fetch": 0,
          "active_shards_percent_as_number": 100,
          "_status_code": 200,
          "status": "green",
          "number_of_nodes": 5
        },
        "http": {
          "request": {
            "host": "<elasticsearch-host>",
            "port": 9200,
            "scheme": "http",
            "method": "get",
            "path": "/_cluster/health"
          },
          "status_code": 200
        }
      },
      "condition": {
        "type": "compare",
        "status": "success",
        "met": true,
        "compare": {
          "resolved_values": {
            "ctx.payload.status": "green"
          }
        }
      },
      "actions": [
        {
          "id": "send_emails",
          "type": "email",
          "status": "success",
          "email": {
            "account": "work",
            "message": {
              "id": "cluster_health_watch_ok_57c07aa4-fce1-42cf-8fcb-22b7a6b09c39-2018-01-24T12:09:51.609Z",
              "from": "<myemailid>",
              "sent_date": "2018-01-24T12:09:51.619Z",
              "to": [
                "<myanotheremailid>"
              ],
              "subject": "Cluster Status OK",
              "body": {
                "text": "Cluster status is GREEN"
              }
            }
          }
        },
        {
          "id": "my_webhook",
          "type": "webhook",
          "status": "failure",
          "reason": "SSLHandshakeException[Received fatal alert: handshake_failure]"
        }
      ]
    },
    "messages": []
  }
}

```

---

<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 24, 2018, 12:32pm UTC](https://discuss.elastic.co/t/not-able-to-send-notifications-to-mattermost-from-x-pack-watcher-with-elastic-search-and-kibana-version-5-6-0/116607/4 "2018-01-24T12:32:15Z")

</div>

Are you using self signed certificates on the mattermost site? Which JDK are you using? Can you run the following against the mattermost system?

```auto
nmap --script ssl-enum-ciphers -p 443 your_mattermost_host

```

---

<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 21, 2018, 12:32pm UTC](https://discuss.elastic.co/t/not-able-to-send-notifications-to-mattermost-from-x-pack-watcher-with-elastic-search-and-kibana-version-5-6-0/116607/5 "2018-02-21T12:32:22Z")

</div>

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