# Create Rule when I have problems with the machine host

**URL:** https://discuss.elastic.co/t/create-rule-when-i-have-problems-with-the-machine-host/322536
**Category:** Elastic Observability
**Created:** [January 5, 2023, 11:17am UTC](https://discuss.elastic.co/t/create-rule-when-i-have-problems-with-the-machine-host/322536 "2023-01-05T11:17:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Kirtash](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kirtash](https://discuss.elastic.co/u/Kirtash)
#### Post date: [January 5, 2023, 11:17am UTC](https://discuss.elastic.co/t/create-rule-when-i-have-problems-with-the-machine-host/322536/1 "2023-01-05T11:17:07Z")

</div>

Good morning!

Is it possible create a rule to detect when the host machine is stopped or the cpu\_usage is superior than 90%

I know that exists the inventory metric but I don't know if I can specify the host. I have many host machine but my intention is only create a rule for one of them

Thanks!!

---

<div class="post-metadata">

### Author: ![maryam-saeidi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maryam-saeidi/32/126947_2.png) [@maryam-saeidi](https://discuss.elastic.co/u/maryam-saeidi)
#### Post date: [January 5, 2023, 11:33am UTC](https://discuss.elastic.co/t/create-rule-when-i-have-problems-with-the-machine-host/322536/2 "2023-01-05T11:33:36Z")

</div>

Hi @Kirtash,

You can use the optional filter in the inventory rule type:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/4/8460c8fc98ee99ae732d9f28d581a58479b394e0.png)

---

<div class="post-metadata">

### Author: ![benakansara](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@benakansara](https://discuss.elastic.co/u/benakansara)
#### Post date: [January 5, 2023, 11:43am UTC](https://discuss.elastic.co/t/create-rule-when-i-have-problems-with-the-machine-host/322536/3 "2023-01-05T11:43:26Z")

</div>

Hi @Kirtash ,

You can configure Inventory rule to alert in case of no data (for example, when host machine is stopped) using the following:

 ![Screenshot 2023-01-05 at 17.02.18](https://us1.discourse-cdn.com/elastic/original/3X/e/f/eff3772cbce805ff619a3a933b423e78ce71b981.png)

If you want to configure an action in case of "No Data" event, you can also use Metric threshold rule.

 ![Screenshot 2023-01-05 at 17.10.40](https://us1.discourse-cdn.com/elastic/original/3X/5/6/56544cfed3b5a803999b15250bdaa8e6b4658192.png)
