# Build metric for a status of a rollout

**URL:** <https://discuss.elastic.co/t/build-metric-for-a-status-of-a-rollout/342429>\
**Category:** Kibana\
**Tags:** elastic-stack-monitoring\
**Created:** [September 6, 2023, 10:33am UTC](https://discuss.elastic.co/t/build-metric-for-a-status-of-a-rollout/342429 "2023-09-06T10:33:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jp1992ger](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@jp1992ger](https://discuss.elastic.co/u/jp1992ger)\
**Post date:** [September 6, 2023, 10:33am UTC](https://discuss.elastic.co/t/build-metric-for-a-status-of-a-rollout/342429/1 "2023-09-06T10:33:10Z")

</div>

Hello everyone,

I currently want to build a metric to track a rollout. So what I want to do is check if a field with a specific value does exist once per host, count these host and match them against hosts where this field with the value does not exist.

Is there a way to do that or am I having the wrong approach?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![miltonhultgren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miltonhultgren/32/100401_2.png) [@miltonhultgren](https://discuss.elastic.co/u/miltonhultgren)\
**Post date:** [September 6, 2023, 11:28am UTC](https://discuss.elastic.co/t/build-metric-for-a-status-of-a-rollout/342429/2 "2023-09-06T11:28:22Z")

</div>

Is this for a Lens visualization?

Do I understand your situation correctly:

- Before rollout, hosts report regularly about the value of `field` and all have the same value
- During rollout, some hosts now report regularly with the new value of `field`, while some still report the old value of `field`
- After rollout, all hosts now report regularly with the new value of `field`

And during the rollout you want to see out of X hosts, how many are now reporting the new value (say 5/10)?

---

<div class="post-metadata">

**Author:** ![jp1992ger](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@jp1992ger](https://discuss.elastic.co/u/jp1992ger)\
**Post date:** [September 6, 2023, 12:47pm UTC](https://discuss.elastic.co/t/build-metric-for-a-status-of-a-rollout/342429/3 "2023-09-06T12:47:21Z")

</div>

Hello @miltonhultgren,

- No this is for a pretty big mixed envoironment with vms/containers/baremetal
- All hosts have that field the field tells you which programm did put data there for example: xyz\_deamon
- After the rollout the entries will have this new value but for those who do not have it I want something like a pie chart best would be to have like a status in percentage of how many it have and how many not

---

<div class="post-metadata">

**Author:** ![miltonhultgren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miltonhultgren/32/100401_2.png) [@miltonhultgren](https://discuss.elastic.co/u/miltonhultgren)\
**Post date:** [September 6, 2023, 2:22pm UTC](https://discuss.elastic.co/t/build-metric-for-a-status-of-a-rollout/342429/4 "2023-09-06T14:22:16Z")

</div>

I tried to make this work in Kibana Lens but couldn't manage.  
However, you might be able to create two different Lens visualizations of the Metric type, one track how many hosts have reported the old value and one to track how many have reported the new value. Though I don't think you can make those dynamic over which value you want to track (old versus new).

---

<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:** [October 4, 2023, 2:22pm UTC](https://discuss.elastic.co/t/build-metric-for-a-status-of-a-rollout/342429/5 "2023-10-04T14:22:46Z")

</div>

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