# Watcher error when force executing

**URL:** <https://discuss.elastic.co/t/watcher-error-when-force-executing/297648>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [February 18, 2022, 8:57pm UTC](https://discuss.elastic.co/t/watcher-error-when-force-executing/297648 "2022-02-18T20:57:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vee/32/55759_2.png) [@vee](https://discuss.elastic.co/u/vee)\
**Post date:** [February 18, 2022, 8:57pm UTC](https://discuss.elastic.co/t/watcher-error-when-force-executing/297648/1 "2022-02-18T20:57:46Z")

</div>

Hi - I noticed this error when attempting to force execute a watcher that triggers out the alert to our monitoring tool - Nagios.

could not parse [webhook] action [_inlined_/notify-nagios]. failed parsing http request template

It was working until recently. We upgraded Elastic from v7.13 to v7/16 recently. Could it be anything to do with enhancements to watchers? We also enabled TLS communication for all HTTP communication with Elastic recently. Couldn't find anything related to it in the release notes from elastic.

Here is the watcher definition:

```auto
{
  "trigger": {
    "schedule": {
      "interval": "1m"
    }
  },
  "input": {
    "search": {
      "request": {
        "search_type": "query_then_fetch",
        "indices": [
          "heartbeat-*"
        ],
        "rest_total_hits_as_int": true,
        "body": {
          "size": 0,
          "query": {
            "bool": {
              "must": [
                {
                  "term": {
                    "monitor.status": {
                      "value": "down"
                    }
                  }
                }
              ],
              "filter": [
                {
                  "range": {
                    "@timestamp": {
                      "from": "now-4m"
                    }
                  }
                }
              ]
            }
          },
          "aggregations": {
            "by_monitors": {
              "terms": {
                "field": "monitor.name",
                "size": 10,
                "min_doc_count": 1
              }
            }
          }
        }
      }
    }
  },
  "condition": {
    "compare": {
      "ctx.payload.hits.total": {
        "gte": 4
      }
    }
  },
  "actions": {
    "notify-nagios": {
      "webhook": {
        "scheme": "https",
        "host": "monitoringhost",
        "port": 443,
        "method": "post",
        "path": "/nrdp/",
        "params": {
          "cmd": "submitcheck",
          "token": "NBT3L0kpNTvpQK9443CulVoct"
        },
        "headers": {
          "Accept": "application/json",
          "Content-Type": "application/x-www-form-urlencoded"
        },
        "auth": {
          "basic": {
            "username": "bofawebapps",
            "password": "::es_redacted::"
          }
        },
        "body": """json={"checkresults": [{"checkresult": {"type": "service"},"hostname": "test-platform","servicename": "test Service Health Check Alert","state": "2","output": "Critical -> test.0 Health Check Alert: {{ctx.payload.hits.total}} Health endpoint(s) is/are not responding in the last minute. Please check Kibana uptime dashboard for the failed health endpoints at https%3A%2F%2Fkibana.bofadm.com%2Fapp%2Fuptime%23%2Fapp%2Fuptime%2F%3FdateRangeStart%3Dnow-1h%26statusFilter%3Ddown "}]}"""
      }
    }
  }
}

```

---

<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:** [February 23, 2022, 8:39am UTC](https://discuss.elastic.co/t/watcher-error-when-force-executing/297648/4 "2022-02-23T08:39:36Z")

</div>

can you share the full exception including stack trace and message if available?

Thanks!

---

<div class="post-metadata">

**Author:** ![vee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vee/32/55759_2.png) [@vee](https://discuss.elastic.co/u/vee)\
**Post date:** [February 23, 2022, 3:46pm UTC](https://discuss.elastic.co/t/watcher-error-when-force-executing/297648/5 "2022-02-23T15:46:54Z")

</div>

It's resolved now, seems like the error msg was throwing me off into the wrong direction when all I had to do was fill up the redacted pwd before simulating. Thanks for the response though.

---

<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:** [March 23, 2022, 3:47pm UTC](https://discuss.elastic.co/t/watcher-error-when-force-executing/297648/6 "2022-03-23T15:47:45Z")

</div>

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