Watcher not firing

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!

{
  "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}}"
        }
      }
    }
  }
}```

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.

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