# Watcher not firing

**URL:** https://discuss.elastic.co/t/watcher-not-firing/276945
**Category:** Kibana
**Tags:** elastic-stack-alerting
**Created:** [June 24, 2021, 2:20pm UTC](https://discuss.elastic.co/t/watcher-not-firing/276945 "2021-06-24T14:20:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jw3b3r](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jw3b3r](https://discuss.elastic.co/u/jw3b3r)
#### Post date: [June 24, 2021, 2:20pm UTC](https://discuss.elastic.co/t/watcher-not-firing/276945/1 "2021-06-24T14:20:28Z")

</div>

Hi!

I want this watcher to send me an email when they find the code 0, but I'm not receiving any emails. I was told that the email is configured on elastic.yml. Maybe Imm doing something wrong.  
Could you help me, please? Thanks!

````auto
{
  "trigger": {
    "schedule": {
      "interval": "1m"
    }
  },
  "input": {
    "search": {
      "request": {
        "search_type": "query_then_fetch",
        "indices": [
          "index*"
        ],
        "rest_total_hits_as_int": true,
        "body": {
          "size": 0,
          "query": {
            "match": {
              "code": "0"
            }
          }
        }
      },
      "extract": [
        "code"
      ]
    }
  },
  "condition": {
    "compare": {
      "ctx.payload.hits.total": {
        "gte": 1
      }
    }
  },
  "actions": {
    "reminder_email": {
      "email": {
        "profile": "standard",
        "to": [
          "email@email.com"
        ],
        "subject": "Test",
        "body": {
          "text": "Timeouts {{ctx.payload.hits.total}}"
        }
      }
    }
  }
}```
````

---

<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: [June 29, 2021, 9:06am UTC](https://discuss.elastic.co/t/watcher-not-firing/276945/2 "2021-06-29T09:06:55Z")

</div>

Please share the output of the execute watch API or take a look at the watch history to share former executions. Use a gist for that one, as the output likely is too long to put in here.

---

<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 27, 2021, 9:07am UTC](https://discuss.elastic.co/t/watcher-not-firing/276945/3 "2021-07-27T09:07:27Z")

</div>

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