Highlighted
Contributor
Contributor

How do I create an alert on a specific date without using a metric?

I want to setup an alert when a certificate needs to be renewed in my service.  I would like to simply create a warning type alert on the certificate expiration date minus 30 days or so.  I've looked at the query language and what I've come up with is pretty ugly, so I'm trying to see if there is something better.

For example, if a certificate expires on June 17, 2019, I could do something like the following:

(year("America/Los_Angeles")=2019 and month("America/Los_Angeles")>=5 and day("America/Los_Angeles")>=18) or (year("America/Los_Angeles")=2019 and month("America/Los_Angeles")>=6)

I'm hoping there is something better that I could use.

Tags (1)
0 Kudos
1 Reply
Highlighted
VMware Employee
VMware Employee

Without sending in a metric, the approach you're taking is probably the route to take. Of course, that would require "hard-coding" the dates.

0 Kudos