'PromQL find helm deployments older than some days
I have deployed the https://github.com/sstarcher/helm-exporter and have metrics in Prometheus containing deployment date (timestamp) I want to find (in Prometheus) deployments older than some days (say, 180) and create an alert with that expression. when I try 'helm_chart_timestamp <= (time() - 15552000)' it returns me no results (and even 'helm_chart_timestamp <= time()' ). What would be the correct expression?
Solution 1:[1]
seems good enough expression for alert is ((time() - helm_chart_timestamp/1000) / 3600 / 24 - 180 ) > 0
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
