hertzbeat icon indicating copy to clipboard operation
hertzbeat copied to clipboard

[Question] Can the 'Remaining Days' field in SSL certificate monitoring be rounded down to an integer?

Open Kylin-Guo opened this issue 1 year ago • 3 comments

Question

image

For instance, I want to get a reminder when there are 30 days left for a certain certificate. But because the 'Remaining Days' field is of numeric type, in the threshold I can only use days_remaining == 30. However, but it has decimal points like '30.8765', so the threshold won't be triggered.

Kylin-Guo avatar Aug 13 '24 04:08 Kylin-Guo

hi, you can try this

equals(toInteger(days_remaining), 30)

pwallk avatar Aug 14 '24 02:08 pwallk

hi, you can try this

equals(toInteger(days_remaining), 30)

That is works, thx! Just the threshold details page looks a little bit odd, because 'equals' & 'toInteger' didn't for numeric type. Maybe 'equals' & 'toInteger' can be added to the selector in the next version?

Kylin-Guo avatar Aug 14 '24 07:08 Kylin-Guo

You can learn about Apache Jexl, or refer

pwallk avatar Aug 15 '24 01:08 pwallk