Formulas in Logsatsh

Hi,
I have a column in my source data which says if a ticket has met its SLAs.

met_sla: true
or
met_sla: false

I wanna calculate the below in Logstash and create a new field called target percent

Target= (count(met_sal: true)/ count(met_sla)) *100

How do i do this?

Is this also possible in Kibana wit DSL queries?

@katara

If your question is building visualisation in kibana on the derived field, then the answer is No.

You can easily implement this using logstash ruby filter, and it will be efficient to do calculations during ingestion.

Check this link https://www.elastic.co/guide/en/logstash/current/plugins-filters-ruby.html

@Ranjith_M, Would i also be able to collect count aggregations in ruby?

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