# Watcher to track specific Drive space

**URL:** <https://discuss.elastic.co/t/watcher-to-track-specific-drive-space/273960>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [May 25, 2021, 2:52pm UTC](https://discuss.elastic.co/t/watcher-to-track-specific-drive-space/273960 "2021-05-25T14:52:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mralladin](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@mralladin](https://discuss.elastic.co/u/mralladin)\
**Post date:** [May 25, 2021, 2:52pm UTC](https://discuss.elastic.co/t/watcher-to-track-specific-drive-space/273960/1 "2021-05-25T14:52:46Z")

</div>

Hello I wanted to create a watcher to track my space on a **specific drive** (D:/) or even machine later. I am not really experienced with them and I read the documentation and followed some examples but it is not working well. This was my first idea but somehow I get the message:

> [parse\_exception] could not parse [compare] condition for watch [_inlined_]. unknown comparison operator [ctx.payload.system.filesystem.used.pct]

When I try to simulate I can not understand why my watcher seems to be invalid.

```
{
  "trigger": {
    "schedule": {
      "interval": "30m"
    }
  },
  "input" : {
    "search" : {
      "request" : {
        "indices" : ["metricbeat-*"]
      },
	  "extract": ["system.filesystem.used.pct", "beat.name", "system.filesystem.mount_point"]
    }
  },
  "condition": {
    "compare": {
          "compare": {"ctx.payload.system.filesystem.used.pct" : { "gte" : 0.33 },"system.filesystem.mount_point":"D://"}
    }
  },
  "actions" : {
	"email_me": {
		"email" : {
			"to" : "philipp.lippold@abc.com",
			"subject" : "{{ctx.payload.beat.name}} {{ctx.payload.system.filesystem.mount_point}} {{ctx.payload.system.filesystem.used.pct}}",
			"body" : "nothing here",
			"priority" : "high"
		}
	}
  }
}

```

---

<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:** [June 22, 2021, 2:52pm UTC](https://discuss.elastic.co/t/watcher-to-track-specific-drive-space/273960/2 "2021-06-22T14:52:49Z")

</div>

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