# Elastic Query for alerts Windows

**URL:** <https://discuss.elastic.co/t/elastic-query-for-alerts-windows/293481>\
**Category:** Elasticsearch\
**Created:** [January 4, 2022, 10:42pm UTC](https://discuss.elastic.co/t/elastic-query-for-alerts-windows/293481 "2022-01-04T22:42:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PublicName](https://avatars.discourse-cdn.com/v4/letter/p/74df32/32.png) [@PublicName](https://discuss.elastic.co/u/PublicName)\
**Post date:** [January 4, 2022, 10:42pm UTC](https://discuss.elastic.co/t/elastic-query-for-alerts-windows/293481/1 "2022-01-04T22:42:14Z")

</div>

I know this is going to be simple but it's just not coming to me at all today.

```auto
GET /logs-*/_eql/search
{
  "query": """
    winlog where winlog.event_id == "4625" and stringContains(message, "The specified account's password has expired")
  """
}

```

Pretty simple really. How to search for an event ID with a particular message so I can set up an alert for it. Not seeing any of the fields in ECS so the examples are making me scratch my head.

---

<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 1, 2022, 10:42pm UTC](https://discuss.elastic.co/t/elastic-query-for-alerts-windows/293481/2 "2022-02-01T22:42:33Z")

</div>

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