@vikasgurlinka you can use OpenDistro Alerting the documentation is here.
You can achieve that you have described using the following steps:
- Provide a query to extract your record.
- 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.
- configure the other trigger and monitoring requirement of alerting
Opendistro alerting is very powerful, wtih painless you can do a lot of things.