Formulas in Logsatsh

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

met_sla: true
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?


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

@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.