# Watcher doesn't recognise chains

**URL:** https://discuss.elastic.co/t/watcher-doesnt-recognise-chains/39006
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting
**Created:** [January 12, 2016, 4:30pm UTC](https://discuss.elastic.co/t/watcher-doesnt-recognise-chains/39006 "2016-01-12T16:30:55Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![NDevox](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ndevox/32/7098_2.png) [@NDevox](https://discuss.elastic.co/u/NDevox)
#### Post date: [January 12, 2016, 4:30pm UTC](https://discuss.elastic.co/t/watcher-doesnt-recognise-chains/39006/1 "2016-01-12T16:30:56Z")

</div>

I'm playing with what I can do with watcher and trying to get chains working. But I get an error when trying to upload the watch:

`{"error":"WatcherException[failed to put watch [chain_tester]]; nested: InputException[could not parse input for watch [chain_tester]. unknown input type [chain]]; ","status":500}`

here is a sample of what I've done (it's a pointless test):

```
{"trigger":{
    "schedule":{
      "interval": "1m"
    }
  },
  "input":{
    "chain":{
      "inputs": [
        {
          "first":{
            "search":{
              "request":{
                "indices": ["logstash-*"],
                "body":{
                  "query": {
                    "filtered": {
                      "query": {
                        "query_string": {
                          "query": "*"
                        }
                      },
                      "filter": {
                        "bool": {
                          "must": [
                            {
                              "range": {
                                "@timestamp": {
                                  "gte": "now-1m",
                                  "lte": "now"
                                }
                              }
                            }
                          ],
                          "must_not": []
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "second":{
            "search":{
              "request":{
                "indices": [".watch_history*"],
                "body":{
                  "query": {
                    "filtered": {
                      "query": {
                        "query_string": {
                          "query": "watch_id: chain_tester"
                        }
                      },
                      "filter": {
                        "bool": {
                          "must": [
                            {
                              "range": {
                                "@timestamp": {
                                  "gte": "now-1m",
                                  "lte": "now"
                                }
                              }
                            }
                          ],
                          "must_not": []
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  },
  "condition":{
    "compare":{
      "ctx.payload.first.hits.total":{
        "gt":1200
      },
      "ctx.payload.second.hits.hits.0.result.condition.met":{
        "eq": false
      }
    }
  }
}  

```

I can't see any syntax errors, so I'm guessing I might be missing something in configuration? Or we may have the wrong watcher version? (I didn't install this one and am not sure how to check the version).

---

<div class="post-metadata">

### Author: ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)
#### Post date: [January 12, 2016, 9:21pm UTC](https://discuss.elastic.co/t/watcher-doesnt-recognise-chains/39006/2 "2016-01-12T21:21:14Z")

</div>

Hi Nick,

We added Chained inputs in Watcher 2.1, which is compatible with ES 2.1. Do you know which version of ES you are running?

Thanks,  
Steve

---

<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 13, 2016, 8:21am UTC](https://discuss.elastic.co/t/watcher-doesnt-recognise-chains/39006/3 "2016-01-13T08:21:52Z")

</div>

Hey,

since Elasticsearch 2.0 the watcher plugin number always resembles the Elasticsearch version, which implies that on an upgrade you have to update Elasticsearch itself as well as the watcher and license plugin.

So, in order to find out, if you are on the right version just open `http://localhost:9200/` and check if the Elasticsearch version is 2.1.x

--Alex

---

<div class="post-metadata">

### Author: ![NDevox](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ndevox/32/7098_2.png) [@NDevox](https://discuss.elastic.co/u/NDevox)
#### Post date: [January 13, 2016, 9:16am UTC](https://discuss.elastic.co/t/watcher-doesnt-recognise-chains/39006/4 "2016-01-13T09:16:19Z")

</div>

Noted we're on 1.7.1.

I'll have a chat with the office about upgrading.

---

<div class="post-metadata">

### Author: ![NDevox](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ndevox/32/7098_2.png) [@NDevox](https://discuss.elastic.co/u/NDevox)
#### Post date: [January 13, 2016, 4:57pm UTC](https://discuss.elastic.co/t/watcher-doesnt-recognise-chains/39006/5 "2016-01-13T16:57:56Z")

</div>

Upgraded but having other issues now. I'll open as a separate thread as they are separate.

---

<div class="post-metadata">

### Author: ![NDevox](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ndevox/32/7098_2.png) [@NDevox](https://discuss.elastic.co/u/NDevox)
#### Post date: [January 14, 2016, 8:11am UTC](https://discuss.elastic.co/t/watcher-doesnt-recognise-chains/39006/6 "2016-01-14T08:11:38Z")

</div>

Here is the new thread:

> [@License not working on 2.1 offline server](https://discuss.elastic.co/t/license-not-working-on-2-1-offline-server/39140):
>
> I just upgraded elasticsearch to 2.1.1 and kibana to 4.3. on a server which is offline I'm trying to install watcher and license but am having trouble - it looks largely to do with license. When installing all goes fine, apart from "unable to verify checksum for downloaded plugin" - which considering we are offline I reckon is fine. But then testing watcher gives me an error (curl -XGET '[http://localhost:9200/\_watcher](http://localhost:9200/_watcher)''). Looking into the logs a bit further I have a lot of errors as below: j…

No responses yet so if anyone here can help it would be appreciated!

---

<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: [July 6, 2017, 1:47pm UTC](https://discuss.elastic.co/t/watcher-doesnt-recognise-chains/39006/7 "2017-07-06T13:47:24Z")

</div>


