# Watherでインデックスサイズを監視する

**URL:** <https://discuss.elastic.co/t/wather/266638>\
**Category:** 日本語による質問・議論はこちら\
**Created:** [March 9, 2021, 6:38am UTC](https://discuss.elastic.co/t/wather/266638 "2021-03-09T06:38:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![t-nakata](https://avatars.discourse-cdn.com/v4/letter/t/8491ac/32.png) [@t-nakata](https://discuss.elastic.co/u/t-nakata)\
**Post date:** [March 9, 2021, 6:38am UTC](https://discuss.elastic.co/t/wather/266638/1 "2021-03-09T06:38:32Z")

</div>

とあるインデックスのサイズを定期的に監視し、閾値を超過したら通知するような仕組みを作りたいです。  
watcherでインデックスを定期的に監視し、一定の容量を超過したら通知するように出来ないかと考えているのですが、watcherの監視設定で特定のインデックスのサイズを取得することは可能なのでしょうか？

---

<div class="post-metadata">

**Author:** ![taku333](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taku333/32/40375_2.png) [@taku333](https://discuss.elastic.co/u/taku333)\
**Post date:** [March 11, 2021, 2:53am UTC](https://discuss.elastic.co/t/wather/266638/2 "2021-03-11T02:53:13Z")

</div>

Stack監視使用している「.monitoring-es-7\*」のインデックスを使用すればできるような気がします。

「index\_stats.index」のfiledで、絞り込んで「index\_stats.total.store.size\_in\_bytes」で閾値を設定すればできるかもしません。

自分も実際に試したのではなくDiscoverよりfiledのみ簡単に確認したのみです。  
どちらのfiledも恐らくこれだろうというものなので、検証とか他のフィールドの確認も必要かと思われます。

> [@Best way to create a watcher that checks index store size](https://discuss.elastic.co/t/best-way-to-create-a-watcher-that-checks-index-store-size/199456):
>
> I'm trying to create a watcher that checks on the store size of an index pattern. I can easily see the information from Devtools by GET /index/stats/store, but how do I do this in a watcher? I'm trying to do an http type request as referenced below, but I'm running into problems doing this. Is this the only way to do it? [https://www.elastic.co/guide/en/elastic-stack-overview/7.2/input-http.html](https://www.elastic.co/guide/en/elastic-stack-overview/7.2/input-http.html)

---

<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:** [April 8, 2021, 2:53am UTC](https://discuss.elastic.co/t/wather/266638/3 "2021-04-08T02:53:14Z")

</div>

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