-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deleted monitors still show in /metrics #598
Comments
This appears to also happen if you change the name of the monitor. |
Seems like the URL is changed, maybe it duplicates because of it ? |
https://github.com/louislam/uptime-kuma/blob/master/server/prometheus.js It seems that there is no "remove logic" in the current implement. May need to remove the monitor from all gauges if the monitor is stopped. |
as i am not familiar with JS, is this going to be fixed anytime soon? |
+1 |
Also experiencing this issue. A fix would be great, unfortunately I am also not experienced enough with JS. Alternatively, does anyone know of a way to filter out a specific monitor from within Prometheus or Grafana? |
Took a shot at it in #1136, please check. |
A quick and easy hack is to restart the container. Restarting seems to have cleared every duplicated monitor. |
Still an issue, and clearing all statistics didn't work |
May need someone to test this pr, as I dont using Prometheus. |
i am testing it with now, but you don't need prometheus to see if it works, just change/delete an endpoint and check |
just tested it with prometheus, it works well and is pretty much instant (less than 1 second delay between edit/delete and updating prometheus endpoint |
Is it a duplicate question?
I looked and did not find anything
Describe the bug
If you remove a monitor from the dashboard, the monitor and its last status still show up in the metrics page. This also occurs if you modify the monitor_url. Changing the monitor url also creates a redundant line in the metrics output.
I am scraping these into Prometheus and using the Grafana Dashboard, but all deleted or modified monitors will show up and remain in my dashboard.
To Reproduce
Steps to reproduce the behavior:
the example I use in the screenshot is Plex.
Expected behavior
Info
Uptime Kuma Version: 1.7.3
Using Docker?: Yes
Docker Version: 20.10.9
Node.js Version (Without Docker only):
OS: Win 10
Browser: Brave
Screenshots
Error Log
The text was updated successfully, but these errors were encountered: