# Central Watcherconfig File for multiple Watchers

**URL:** <https://discuss.elastic.co/t/central-watcherconfig-file-for-multiple-watchers/179505>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [May 3, 2019, 9:23am UTC](https://discuss.elastic.co/t/central-watcherconfig-file-for-multiple-watchers/179505 "2019-05-03T09:23:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![6tUBp3gwd9Zp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/6tubp3gwd9zp/32/45240_2.png) [@6tUBp3gwd9Zp](https://discuss.elastic.co/u/6tUBp3gwd9Zp)\
**Post date:** [May 3, 2019, 9:23am UTC](https://discuss.elastic.co/t/central-watcherconfig-file-for-multiple-watchers/179505/1 "2019-05-03T09:23:57Z")

</div>

Is it possible to have a central script where all the Watcherconfigs e.g threshold, triggerinterval... are saved and accessible for multiple watchers. Similar to the possibility to have the condition in a single script. If so, how can that be done and where can that be uploaded?

```
   {
	"metadata": {
		"name": "name",
		"watcherconfig": {
			"trigger_interval_unit": "m",
			"agg_type": "avg",
			"time_field": "@timestamp",
			"trigger_interval_size": 5,
			"term_size": 5,
			"time_window_unit": "d",
			"threshold_comparator": "<",
			"term_field": null,
			"index": ["index*"],
			"time_window_size": 1,
			"threshold": 0.5,
			"agg_field": null
		}
	}}
```

---

<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:** [May 6, 2019, 7:40am UTC](https://discuss.elastic.co/t/central-watcherconfig-file-for-multiple-watchers/179505/2 "2019-05-06T07:40:10Z")

</div>

Hey,

this is currently not possible. You will need to put this in every watch. Maybe a deployment tool can help you with scripting those watches together. I created a [prototype](https://github.com/spinscale/lead) some time ago, that may help you to get some more ideas about that.

--Alex

---

<div class="post-metadata">

**Author:** ![6tUBp3gwd9Zp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/6tubp3gwd9zp/32/45240_2.png) [@6tUBp3gwd9Zp](https://discuss.elastic.co/u/6tUBp3gwd9Zp)\
**Post date:** [May 6, 2019, 10:57am UTC](https://discuss.elastic.co/t/central-watcherconfig-file-for-multiple-watchers/179505/3 "2019-05-06T10:57:30Z")

</div>

Thank you I'll check this out.

---

<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 3, 2019, 10:57am UTC](https://discuss.elastic.co/t/central-watcherconfig-file-for-multiple-watchers/179505/4 "2019-06-03T10:57:31Z")

</div>

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

---

<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 3, 2019, 10:57am UTC](https://discuss.elastic.co/t/central-watcherconfig-file-for-multiple-watchers/179505/5 "2019-06-03T10:57:31Z")

</div>



---

<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:** [November 4, 2022, 7:06am UTC](https://discuss.elastic.co/t/central-watcherconfig-file-for-multiple-watchers/179505/6 "2022-11-04T07:06:24Z")

</div>


