Variation values alarm

Tags: #<Tag:0x00007f84b2acc478>

Hi,

What happens is that I want to create an alarm when there is a variation in an optimal port of more than 1 Db, would you have any idea how to do it?. I think that maybe it could be done with the previous value but with a date of at least 4 hours before, however I observe that the database does not keep a history of the previous values ​​but updates them.

Thanks.