Arithmetic operations of fields

Hi, I want to perform arithmetic operations over kibana fields for alerting. I have to calculate the percentage of disk utilized, have available free space and total disk fields, and need to trigger an alert if it crosses the threshold. would like to know how to achieve this functionality? Are any plugins available?


Thank you

Currently, you can alert on the data stored in the indices only.

@vikasgurlinka you can use OpenDistro Alerting the documentation is here.
You can achieve that you have described using the following steps:

  1. Provide a query to extract your record.
  2. provide a painless expression that calculate the ratio: i.e
(1 - ctx.results[0].hits.hits[0].free_space_field /  ctx.results[0].hits.hits[0].total_space_field) > 0.8

The 0.8 is the 80% of disk utilization.
You can also use an aggregation and do the computation on average od value in a time frame (my suggestion)
Check your script for no results case and null values.

  1. configure the other trigger and monitoring requirement of alerting

Opendistro alerting is very powerful, wtih painless you can do a lot of things.