uptime-kuma icon indicating copy to clipboard operation
uptime-kuma copied to clipboard

After 1.19.0 update cert expiry promtheus metrics are missing from http(s) monitors

Open ntimo opened this issue 2 years ago • 5 comments

⚠️ Please verify that this bug has NOT been raised before.

  • [X] I checked and didn't find similar issue

🛡️ Security Policy

Description

After the update to version 0.19.0 some Prometheus metrics are missing for the the monitor type „http(s)“ with certificate expiration checks enabled. However metrics of type „http(s) - keyword“ are still reported via the metric monitor_cert_days_remaining

👟 Reproduction steps

Update to the latest version:

  • Check the prometheus metric monitor_cert_days_remaining and see that the metris are missing

👀 Expected behavior

The metrics for both „http(s)“ and „http(s) - keyword“ monitors should be there

😓 Actual Behavior

The metrics for „http(s)“ monitors are missing

🐻 Uptime-Kuma Version

1.19.0

💻 Operating System and Arch

Ubuntu 20.04

🌐 Browser

Safari

🐋 Docker Version

No response

🟩 NodeJS Version

No response

📝 Relevant log output

No response

ntimo avatar Dec 23 '22 21:12 ntimo

Can you see the cert expiry date on the dashboard?

It happens when it is failed to retrive the cert:

https://github.com/louislam/uptime-kuma/blob/2adb142ae25984ecebfa4b51c739fec5e492763a/server/prometheus.js#L73-L75

louislam avatar Dec 24 '22 04:12 louislam

Can confirm, uptime kuma stopped exporting TLS cert expiry date since the update. Also i can no longer find it in the dashboard either

thefeli73 avatar Dec 24 '22 11:12 thefeli73

@louislam on the dashboard the expiry date is also not shown, but only for the http(s) monitors for my keyword monitors it’s shown correctly

ntimo avatar Dec 24 '22 11:12 ntimo

Can confirm the same behaviour. Also expiry date on dashboard is gone. It was working yesterday before the upgrade.

Below the beginning of the output of the metrics page.

# HELP monitor_cert_days_remaining The number of days remaining until the certificate expires
# TYPE monitor_cert_days_remaining gauge

# HELP monitor_cert_is_valid Is the certificate still valid? (1 = Yes, 0= No)
# TYPE monitor_cert_is_valid gauge
monitor_cert_is_valid{monitor_name="

skaldenhoven avatar Dec 24 '22 14:12 skaldenhoven

Confirmed, 1.19.0-beta.0 is ok, but 1.19.0-beta.1 is bugged.

louislam avatar Dec 24 '22 16:12 louislam

can confirm bug in the 1.19.0 release also

apvlv avatar Dec 26 '22 09:12 apvlv