I am using Prometheus monitoring to monitor couple of nodes(virtual machines). I am trying to write a alert rule i.e if avg of all cpu cores usage in the last 24 hours is less than a threshold value then fire the alert for the same.. (basically if a virtual machine has been idle all along in the last 24 hours then fire alert).
For this i want to create a record rule to record the data for last 24 hours and then i want to create an alert to analyse the last 24 hours data and fire alert if the query is true).
what should be the rules yaml file for that.