louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
59.99k stars 5.36k forks source link

Issue while trying to use the v2 and tags not appearing in metrics #5131

Open ErwanV1 opened 1 month ago

ErwanV1 commented 1 month ago

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

🛡️ Security Policy

📝 Describe your problem

I’ve been exploring Uptime Kuma’s v2 Docker images, including pr-test2, nightly2, and others. However, I've encountered some issues:

Tag Behavior: There are multiple Docker tags available for v2 (e.g., pr-test2, nightly2, 2-slim), but some of them don't seem to function as expected. Specifically:

The pr-test2 tag has issues with creating monitors and restarting the container. The nightly2 tag works better overall but doesn't include certain expected features, such as seeing tags in metrics at /metrics. Metrics Issues: In nightly2, the metrics don’t show the tags associated with the monitors. I expect tags to appear in these metrics (for better categorization and visibility), but they do not. Is this a configuration issue, or a limitation of the current nightly2 build? ocker Tags & Documentation: While I appreciate the variety of Docker tags provided, it's unclear which ones are most stable and recommended for production-like testing, especially for v2. There are several tags for v2 (2, 2-slim, nightly2, pr-test2, etc.), but I’ve encountered issues with some of them, such as pr-test2 failing to work properly with monitors.

Is there a roadmap or recommended guide for testing Uptime Kuma v2, especially for those of us looking to test features such as the tags in metrics?

📝 Error Message(s) or Log

For example, here's the output at http://localhost:3001/metrics:

TYPE monitor_cert_days_remaining gauge

monitor_cert_days_remaining{monitor_name="toto",monitor_type="http",monitor_url="https://google.com",monitor_hostname="null",monitor_port="null"} 53

🐻 Uptime-Kuma Version

Docker Images: louislam/uptime-kuma:pr-test2 & louislam/uptime-kuma:nightly2

💻 Operating System and Arch

Windows

🌐 Browser

Brave Browser with google

🖥️ Deployment Environment

louislam commented 1 month ago

Should be related to this bug: https://github.com/louislam/uptime-kuma/issues/5096

ldubrois commented 1 month ago

I think what @ErwanV1 is also pointing, and I have myself experienced, is the lack of documentation on how to test Kuma v2.

I known / understand it is still in development and is not production ready ; and probably having people testing stuff not yet ready is clearly not your priority.

However, the documentation refers to tags and testing procedures that are not working (from my tests).

In my environment I am trying to run a recent v2 alpha/beta build but I cannot get it working.

CommanderStorm commented 1 month ago

refers to tags and testing procedures that are not working (from my tests)

What does not work specifically?

trying to run a recent v2 alpha/beta

I don't know of any such release. You likely are referring to https://hub.docker.com/layers/louislam/uptime-kuma/nightly2/images/sha256-3fd33263881e83c8642585e738c7f0c120d28831f8634cb583d33643ffa249fb?context=explore which we published 3 months ago to test if the docker image building works as expected. Despite the name this is not a nightly release. See #4500 for what is needed for a beta.0 to be published.

ldubrois commented 1 month ago

What does not work specifically?

I was mainly thinking about :

docker run --rm -it -p 3000:3000 -p 3001:3001 --pull always -e 'UPTIME_KUMA_GH_REPO=<PR REPO, YOU CAN COPY>' louislam/uptime-kuma:pr-test2

I was not able to run it without errors, but I am really not an expert in npm / node / etc

See https://github.com/louislam/uptime-kuma/issues/4500 for what is needed for a beta.0 to be published.

I have already read (quickly) this issue, but could not found how to test it.

I was alreay using Kuma for some monitoring (about 15 monitors) and now I want to use it to monitor our main web app (expecting about 400 monitors). So I thought about starting with the v2 even if it is not released, and may be to report some issue I found (because it is a new deployment, i can use a alpha/beta).

CommanderStorm commented 1 month ago

Which which PR did you replace <PR REPO, YOU CAN COPY> with?

starting with the v2

Given the bugs which are known such as non-ascii tags breaking the metrics, I would not recommend running it productively before we release a beta. I think of beta releases as "users can run this in prod without severe known bugs".

ldubrois commented 1 month ago

Sorry, big week, did not get time to reply to your message.

It was weeks ago, I honestly do not remember which PR i tried.

 

I am like a kid, I want the latest 😁.

More seriously, Prometheus tags is a kind of pre-requisite to start the project ; we need to graph the monitors from grafana and group monitors by tags (kind of app, part of the app, tenant, etc).

We will think about your warning concerning bugs but we may try it anyway to get tags (even with bugs), and avoid migration later.

massimoghm commented 4 days ago

Maybe related, when I add a new tag to a monitor and remove another one, save re-add the old one. If I'm try to remove only one, the X button of the tag remove also the others tag of monitor but when I save all tags stay here. If I'm try to remove monitor from tags setting, no luck.

Best regards