# Sensu Availability Report using Kibana

**URL:** <https://discuss.elastic.co/t/sensu-availability-report-using-kibana/71996>\
**Category:** Kibana\
**Created:** [January 18, 2017, 11:56am UTC](https://discuss.elastic.co/t/sensu-availability-report-using-kibana/71996 "2017-01-18T11:56:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmaluf](https://avatars.discourse-cdn.com/v4/letter/p/e9c0ed/32.png) [@pmaluf](https://discuss.elastic.co/u/pmaluf)\
**Post date:** [January 18, 2017, 11:56am UTC](https://discuss.elastic.co/t/sensu-availability-report-using-kibana/71996/1 "2017-01-18T11:56:48Z")

</div>

I'm using Sensu to monitoring my hosts and services and I'd like to create an "Avaiability Report" to show how close of the 99,9999% my services are.

Something like the Nagios does: ![](https://us1.discourse-cdn.com/elastic/original/2X/5/501fdc9952c46076c1c06ca7c4e73dea433aa36f.png)

So far, I have done the following:

1. Calculate the "downtime" in seconds using the "elapsed" function on logstash:  
filter { if [type] == "sensu-logstash" {  
mutate {  
add\_field =\> { "unique\_id" =\> "%{check\_name}\_%{host}" }  
}  
elapsed {  
unique\_id\_field =\> "unique\_id"  
start\_tag =\> "sensu-ALERT"  
end\_tag =\> "sensu-RESOLVE"  
timeout =\> 172800  
}  
}

2. Created a "Script Field" to calculated the last 30 days on Kibana:

3. Created a Data Table visualization: 

I'd like to make this in dynamic way, using the time interval that we select on Kibana(Last 4 hours, this week, this month and so on...)

How is the best way to do that?

Thanks!

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [January 19, 2017, 12:23am UTC](https://discuss.elastic.co/t/sensu-availability-report-using-kibana/71996/2 "2017-01-19T00:23:52Z")

</div>

Hi Paulo,

I seem to recall someone telling me you could use something like `$interval` in your script. But I'm not 100% sure. I'll try to find some example and/or try it myself.

Regards,  
Lee

---

<div class="post-metadata">

**Author:** ![pmaluf](https://avatars.discourse-cdn.com/v4/letter/p/e9c0ed/32.png) [@pmaluf](https://discuss.elastic.co/u/pmaluf)\
**Post date:** [January 23, 2017, 5:14pm UTC](https://discuss.elastic.co/t/sensu-availability-report-using-kibana/71996/3 "2017-01-23T17:14:00Z")

</div>

Hi Lee,

I'll looking for the `$interval`. If you find any examples, please let me know.

Regards,  
Paulo.

---

<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:** [February 20, 2017, 5:14pm UTC](https://discuss.elastic.co/t/sensu-availability-report-using-kibana/71996/4 "2017-02-20T17:14:02Z")

</div>

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