# Sum time of certain status per machine

**URL:** <https://community.grafana.com/t/sum-time-of-certain-status-per-machine/37886>\
**Category:** Prometheus\
**Created:** [October 13, 2020, 12:26pm UTC](https://community.grafana.com/t/sum-time-of-certain-status-per-machine/37886 "2020-10-13T12:26:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alberthoekstra](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@alberthoekstra](https://community.grafana.com/u/alberthoekstra)\
**Post date:** [October 13, 2020, 12:26pm UTC](https://community.grafana.com/t/sum-time-of-certain-status-per-machine/37886/1 "2020-10-13T12:26:35Z")

</div>

Hello,

I got an metric ‘machine\_metrics\_status’ that exports the current status (as an int) per machine.  
So for example i got 3 machines i get these values:  
machine\_metrics\_status{machine=“Machine 1”}  
machine\_metrics\_status{machine=“Machine 2”}  
machine\_metrics\_status{machine=“Machine 3”}

The value of these metrics is an integer value. Every number represents a certain status.  
I want to be able to calculate the time per status per machine over the time period I selected.

Do you have any suggestion how to make this calculation?
