I have a measurement “subscription” with a value “expiration” that’s an expiration date, stored as a unix timestamp.
In Kapacitor, is it possible to compare it with now() to create alerts ? For instance, I would like to send alerts when a subscription has expired (so expiration < now())
Is there any way to achieve that ? (even with another type than a unix timestamp stored as a numeric value)
I have already tried something like this:
batch |query('''SELECT * FROM "mydb"."autogen"."subscription"''') .period(10h) .every(10s) |alert() .crit(lambda: "expiration" < now()) .log('/tmp/dates-alerts.log')