# PRO TIP - New Metric Host Availability State

**URL:** <https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968>\
**Category:** Dynatrace Tips\
**Tags:** dynatrace-managed, oneagent, tips-and-tricks\
**Created:** [March 23, 2023, 12:29pm UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968 "2023-03-23T12:29:20Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [March 23, 2023, 12:29pm UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/1 "2023-03-23T12:29:20Z")

</div>

With the release of [OneAgent 1.261](https://www.dynatrace.com/support/help/shortlink/release-notes-oneagent-sprint-261#host-availability-state-sent-as-metric) a new and long awaited metric is available!!!

The OneAgent OS module now reports the host availability state as a metric.

Metric key: builtin:host.availability.state

 ![DanielS_0-1679573991026.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/5/d5c2a03f7cf49f45a1a199f9959494fd140b99d4.png)

Reported states:

- UP - host working, OneAgent active and sending data
- NO\_DATA - host working, OneAgent active but not sending data
- NO\_DATA\_AGENT\_INACTIVE - host working, OneAgent inactive (disabled manually in configuration) and not sending data
- SHUTDWON\_HOST - host has been shut down
- UNMONITORED\_AGENT\_STOPPED - host unmonitored: OneAgent stopped
- UNMONITORED\_AGENT\_UPGRADE - host unmonitored: OneAgent in upgrade
- UNMONITORED\_AGENT\_UNINSTALLED - host unmonitored: OneAgent uninstalled

The resolution is 1 minute: states are sent every minute, always with the value 1, which means that the reported state occurred in the given minute. If there is no sample with the given state, it means that the state was not detected in this minute.

**Why is important?**

Because it allow us to generate alerts based on different use cases:

- Unistalled OneAgents
- Stopped OneAgents
- OneAgents that are working but no data is received.
- OneAgents manually disabled .

and thus improve the management we have over the deployed OneAgents

 ![DanielS_1-1679574031336.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/f7d35b5cff7e6876c601de02ac370e8b299d04ce.png)

👏👏Thanks&nbsp;:dynaspin: Dynatrace :dynaspin:Team!!!

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [March 23, 2023, 12:34pm UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/2 "2023-03-23T12:34:48Z")

</div>

Great -&nbsp;it will be very useful!

---

<div class="post-metadata">

**Author:** ![JDS](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@JDS](https://community.dynatrace.com/u/JDS)\
**Post date:** [March 30, 2023, 5:34pm UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/3 "2023-03-30T17:34:10Z")

</div>

Thanks for this info&nbsp;[@DanielS](https://community.dynatrace.com/user/35788)&nbsp; What should be the threshold if I use the metric key “builtin:host.availability.state” to create a Metric Event? I need a Metric event when the actual host is down. What should be threshold?

 ![Host Availbility State Metric Event.png](https://global.discourse-cdn.com/dynatrace/original/2X/e/e5e5c4542175bab494a7bf72e7d80dc3c014ec8e.png)

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [March 30, 2023, 6:08pm UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/4 "2023-03-30T18:08:41Z")

</div>

Hello [@JDS](https://community.dynatrace.com/user/49244) thanks, you could use the metric selector option with this text:

```markup
builtin:host.availability.state:filter(and(or(eq("availability.state",shutdown_host)))):splitBy("dt.entity.host"):sort(value(auto,descending)):limit(100)

```

 ![DanielS_0-1680199530213.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/f8d1d736f9db5ec28c8087994e912cf483242786.png)

Also if you want to add more “down states” you could do it:

```markup
builtin:host.availability.state:filter(and(or(eq("availability.state",shutdown_host),eq("availability.state",unmonitored_agent_stopped)))):splitBy("dt.entity.host"):count:sort(value(avg,descending)):limit(100)

```

---

<div class="post-metadata">

**Author:** ![JDS](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@JDS](https://community.dynatrace.com/u/JDS)\
**Post date:** [March 30, 2023, 6:27pm UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/5 "2023-03-30T18:27:50Z")

</div>

Thanks&nbsp;[@DanielS](https://community.dynatrace.com/user/35788) I tried to see additional options in data explorer but I am getting on “no\_data” and “up” states alone. If I use the this expression in Metric selector what should be the value of the threshold that will trigger an event when the host goes down?

I tried using the host availability percentage metric but it isn’t scaling as the allowed dimension is only 5000. We have around 12K hosts in our Non-Production environment.

 ![JDS_0-1680200663074.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/2/52ad4701e83a6fd9d970c7a31c3eb1333887558f.png)

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [March 30, 2023, 6:35pm UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/6 "2023-03-30T18:35:57Z")

</div>

Hi [@JDS](https://community.dynatrace.com/user/49244), you didn’t see the other states because you don’t have such events in the selected time window. I have posted all the events in my first post, try using them in the filters, when they are at 0 and go up to 1 this will trigger the event. I guess this is the best approach.

---

<div class="post-metadata">

**Author:** ![JDS](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@JDS](https://community.dynatrace.com/u/JDS)\
**Post date:** [March 30, 2023, 7:31pm UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/7 "2023-03-30T19:31:45Z")

</div>

Thanks&nbsp;[@DanielS](https://community.dynatrace.com/user/35788).&nbsp;I used this Metric selector expression “builtin:host.availability.state:filter(and(or(eq(“availability.state”,“up”)))):splitBy(“dt.entity.host”):sort(value(auto,descending)):limit(100)” and received the data points shown in the screenshot.

I don’t understand what does the value 10, 6, 12, etc. means? Also what does the values in the Y axis stands for? The values in X axis refers to the time line which I is clear for me.

 ![JDS_0-1680204535149.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/4/44e3984af03d14e82afd0a7c7f086407e3345612.png)

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [March 30, 2023, 9:15pm UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/8 "2023-03-30T21:15:39Z")

</div>

Hi [@JDS](https://community.dynatrace.com/user/49244) if you use **up** as state you are going to see the count of all host that are in up state. In that case you need to know the quantity and trigger the alert when this decrease.

---

<div class="post-metadata">

**Author:** ![JDS](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@JDS](https://community.dynatrace.com/u/JDS)\
**Post date:** [March 31, 2023, 12:19am UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/9 "2023-03-31T00:19:22Z")

</div>

uh understood,&nbsp;[@DanielS](https://community.dynatrace.com/user/35788)&nbsp;If I need to use the **UP** state monitor and if I have 1k hosts in our environment then the threshold for this Metric event will be 1000 so it will trigger an alert when the count is less than the threshold, correct.

I am looking for an alert to be triggered when any specific host in the environment is down where the alert/dynatrace problem generated will tell me the specific host as down which I can send to server team through problem notification

---

<div class="post-metadata">

**Author:** ![sivart\_89](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sivart\_89](https://community.dynatrace.com/u/sivart_89)\
**Post date:** [March 31, 2023, 1:23am UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/10 "2023-03-31T01:23:27Z")

</div>

Definitely a great improvement here. Have you been able to get a problem to remain open when the agent is not running? Creating a problem is no issue but it closes shortly after even when the agent is still not running. I assume it is because there is no continuous datapoint of 1 for the unmonitored\_agent\_stopped state, you only get the initial 1 datapoint when the agent stops.

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [March 31, 2023, 4:18pm UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/11 "2023-03-31T16:18:56Z")

</div>

thanks [@sivart\_89](https://community.dynatrace.com/user/17361) but you can alert on missing data also:

 ![DanielS_0-1680279488524.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/6/868220e5a0990b86110d30d97b174dd59383a7e2.png)

---

<div class="post-metadata">

**Author:** ![santruan](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@santruan](https://community.dynatrace.com/u/santruan)\
**Post date:** [June 7, 2024, 5:45pm UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/12 "2024-06-07T17:45:20Z")

</div>

Hi experts, regarding this topic, is it possible to obtain the time in which a host was in the shutdown state?

---

<div class="post-metadata">

**Author:** ![Chaitanya30](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Chaitanya30](https://community.dynatrace.com/u/Chaitanya30)\
**Post date:** [May 7, 2025, 10:45am UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/13 "2025-05-07T10:45:01Z")

</div>

Hi&nbsp;[@JDS](https://community.dynatrace.com/user/49244)&nbsp;  
can you please help me if you have an option to filter specific host wise?  
and please what metric selector you are using?

Best regards

Chaitanya

---

<div class="post-metadata">

**Author:** ![Chaitanya30](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Chaitanya30](https://community.dynatrace.com/u/Chaitanya30)\
**Post date:** [May 9, 2025, 10:23am UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/14 "2025-05-09T10:23:43Z")

</div>

Hello&nbsp;[@DanielS](https://community.dynatrace.com/user/35788)&nbsp;,  
I have used this below metric selector&nbsp;  
builtin:host.availability.state:splitBy(“availability.state”,“dt.entity.host”):sort(value(count,descending))  
and would like to add metric event for the state other than “UP”. But I can see all the states returns same value as 1440 or 1439 for 24hours timeframe.

 ![Chaitanya30_0-1746786198840.png](https://global.discourse-cdn.com/dynatrace/original/2X/2/29b8a2914ceaed781bd2bceda9e09afe6f206bfc.png)

Could you please help me how best we can achieve this to get the host availability alert for particular host?

Best regards  
Chaitanya

---

<div class="post-metadata">

**Author:** ![Ronald](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@Ronald](https://community.dynatrace.com/u/Ronald)\
**Post date:** [September 16, 2025, 12:32am UTC](https://community.dynatrace.com/t/pro-tip-new-metric-host-availability-state/38968/15 "2025-09-16T00:32:28Z")

</div>

I still can’t understand how to use this metric to tell me the current state of the host.&nbsp; &nbsp;Would love to know not only that at some point within the timeframe the host became unmonitored but that it is still in an unmonitored state.&nbsp; I can see the info from the deployment status but a dashboard tile showing this info would be amazing!
