# Watcher parse\_exception (actions proxy.host)

**URL:** https://discuss.elastic.co/t/watcher-parse-exception-actions-proxy-host/165347
**Category:** Elasticsearch
**Tags:** elastic-stack-monitoring, elastic-stack-alerting
**Created:** [January 23, 2019, 7:19am UTC](https://discuss.elastic.co/t/watcher-parse-exception-actions-proxy-host/165347 "2019-01-23T07:19:41Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![hanase](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hanase/32/40115_2.png) [@hanase](https://discuss.elastic.co/u/hanase)
#### Post date: [January 23, 2019, 7:19am UTC](https://discuss.elastic.co/t/watcher-parse-exception-actions-proxy-host/165347/1 "2019-01-23T07:19:42Z")

</div>

Hi elastic community,

I use kibana watcher send alert message to telegram.

error log input search and filter work very well.

But, in actions part, I need to use proxy connect to the external network.

I got information below

> Watcher: [parse\_exception] could not parse http request template. unexpected string field [proxy.host]

My proxy setting wrong?

Here is my watcher config

> "actions": {  
> "my\_webhook": {  
> "webhook": {  
> "scheme": "http",  
> "host": "[api.telegram.org](http://api.telegram.org)",  
> "port": 443,  
> "proxy.host": "172.16.99.125",  
> "proxy.port": "3128",  
> "method": "post",  
> "path": "/botmybotid/sendMessage",  
> "params": {  
> "text": "There are {{ctx.payload.hits.total}} error logs occurred 30 minutes ago",  
> "chat\_id": "-mychatid"  
> },  
> "headers": {}  
> }  
> }  
> }  
> }

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [January 24, 2019, 9:21pm UTC](https://discuss.elastic.co/t/watcher-parse-exception-actions-proxy-host/165347/2 "2019-01-24T21:21:29Z")

</div>

Hi, it looks like you meant to post this question in the Elasticsearch topic, because Watcher is a feature of X-Pack in Elasticsearch. Kibana has a UI for crafting Watches, but the functionality remains in ES.

Hope that helps,  
-Tim

---

<div class="post-metadata">

### Author: ![Izek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/izek/32/37113_2.png) [@Izek](https://discuss.elastic.co/u/Izek)
#### Post date: [January 25, 2019, 2:28am UTC](https://discuss.elastic.co/t/watcher-parse-exception-actions-proxy-host/165347/3 "2019-01-25T02:28:19Z")

</div>

> [@hanase](#):
>
> "proxy.port": "3128",

try to remove the double quote

---

<div class="post-metadata">

### Author: ![hanase](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hanase/32/40115_2.png) [@hanase](https://discuss.elastic.co/u/hanase)
#### Post date: [January 25, 2019, 4:31am UTC](https://discuss.elastic.co/t/watcher-parse-exception-actions-proxy-host/165347/4 "2019-01-25T04:31:21Z")

</div>

> [@hanase](#):
>
> "proxy.host": "172.16.99.125",  
> "proxy.port": "3128",

hi, now remove the double quote

> "actions": {  
> "my\_webhook": {  
> "webhook": {  
> "scheme": "https",  
> "host": "[api.telegram.org](http://api.telegram.org)",  
> "port": 443,  
> "proxy.host": "172.16.99.125",  
> "proxy.port": 3128,  
> "method": "post",  
> "path": "/botmybotid/sendMessage",  
> "params": {  
> "text": "There are {{ctx.payload.hits.total}} error logs occurred 30 minutes ago",  
> "chat\_id": "mychatid"  
> },  
> "headers": {}  
> }  
> }  
> }

I still got information

> Watcher: [parse\_exception] could not parse http request template. unexpected string field [proxy.host]

---

<div class="post-metadata">

### Author: ![Izek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/izek/32/37113_2.png) [@Izek](https://discuss.elastic.co/u/Izek)
#### Post date: [January 25, 2019, 5:37am UTC](https://discuss.elastic.co/t/watcher-parse-exception-actions-proxy-host/165347/5 "2019-01-25T05:37:35Z")

</div>

Remove double quote from proxy.host as well.

---

<div class="post-metadata">

### Author: ![hanase](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hanase/32/40115_2.png) [@hanase](https://discuss.elastic.co/u/hanase)
#### Post date: [January 25, 2019, 6:39am UTC](https://discuss.elastic.co/t/watcher-parse-exception-actions-proxy-host/165347/6 "2019-01-25T06:39:27Z")

</div>

hi, Izek

I remove double quote from proxy.host , then I got Invalid JSON error.

 ![upelast](https://us1.discourse-cdn.com/elastic/original/3X/b/a/babdd25c43fdbf7db0c032a16a41997db487731e.png)

---

<div class="post-metadata">

### Author: ![hanase](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hanase/32/40115_2.png) [@hanase](https://discuss.elastic.co/u/hanase)
#### Post date: [January 28, 2019, 3:15am UTC](https://discuss.elastic.co/t/watcher-parse-exception-actions-proxy-host/165347/7 "2019-01-28T03:15:52Z")

</div>

Here is my latest config, it is works!!

```
"actions": {
"my_webhook": {
  "webhook": {
    "scheme": "https",
    "host": "api.telegram.org",
    "port": 443,
    "method": "get",
    "path": "/bot **********:*********** /sendMessage",
    "params": {
      "text": "There are {{ctx.payload.hits.total}} error logs occurred 30 minutes ago ",
      "chat_id": "- *********"
    },
    "headers": {},
    "proxy": {
      "host": "172.16.99.125",
      "port": 3128
    }
  }
}

```

}

---

<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 25, 2019, 3:16am UTC](https://discuss.elastic.co/t/watcher-parse-exception-actions-proxy-host/165347/8 "2019-02-25T03:16:00Z")

</div>

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