# Watcher's json query from Github

**URL:** <https://discuss.elastic.co/t/watchers-json-query-from-github/80937>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [April 3, 2017, 1:41am UTC](https://discuss.elastic.co/t/watchers-json-query-from-github/80937 "2017-04-03T01:41:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![smengr](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@smengr](https://discuss.elastic.co/u/smengr)\
**Post date:** [April 3, 2017, 1:41am UTC](https://discuss.elastic.co/t/watchers-json-query-from-github/80937/1 "2017-04-03T01:41:04Z")

</div>

Hi Everyone!

I want to have a tracking or logs of those who made modification in the queries. Is it possible to integrate watcher to github? what i wanted to happen is that every one watcher (json query) would be inside a file and that file would be residing in Github.

Thanks in advance for your help!

Regards,  
John

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 3, 2017, 1:59am UTC](https://discuss.elastic.co/t/watchers-json-query-from-github/80937/2 "2017-04-03T01:59:31Z")

</div>

You can't read watches from a file unfortunately, they need to be sent to ES via the APIs.

It's this way to reduce security issues stemming from people arbitrarily changing such config files (even in these sorts of cases).

---

<div class="post-metadata">

**Author:** ![smengr](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@smengr](https://discuss.elastic.co/u/smengr)\
**Post date:** [April 3, 2017, 2:05am UTC](https://discuss.elastic.co/t/watchers-json-query-from-github/80937/3 "2017-04-03T02:05:19Z")

</div>

Thanks for the reply!

Newbie here. I'm not into Dev works. my job is more into Operations. Can you send/show an example how to pull it off? just a simple example how to do it and I'll work from there.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 3, 2017, 2:16am UTC](https://discuss.elastic.co/t/watchers-json-query-from-github/80937/4 "2017-04-03T02:16:09Z")

</div>

You need something that sends the watch (as a json file) to Elasticsearch.

eg a commit hook that curls the file to Elasticsearch, or something like that.

---

<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:** [May 1, 2017, 2:16am UTC](https://discuss.elastic.co/t/watchers-json-query-from-github/80937/5 "2017-05-01T02:16:10Z")

</div>

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