Alert on time difference / time to live

Hi, I have a series of metrics that provide expiration epoch timestamps (for SSL certificates) in Graphite. I can graph them in Grafana as “From Now” which is excellent! :slight_smile:

What I’d like to do, is set an alert on the “time remaining” being less than some number of days. eg something like:

(foo.certificate.* - NOW()) < 30days

Is it possible to either get the Graphite query to convert epoch timestamps to “time remaining” (or an offset to/from “now”), or alternatively is there some way to set the alert criteria to do the same?

Thanks! :slight_smile: