Sensu Availability Report using Kibana


(Paulo Victor Maluf Alves) #1

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:

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:

    Name: month_pct
    Script: (2592000 - doc['elapsed_time'].value)/2592000
    Format: Percentage

  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!


(Lee Drengenberg) #2

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


(Paulo Victor Maluf Alves) #3

Hi Lee,

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

Regards,
Paulo.


(system) #4

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