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

RATE-LIMIT whit Prometheus

Open tokar86a opened this issue 10 months ago • 4 comments

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

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

🛡️ Security Policy

📝 Describe your problem

Trying to found out why i am getting this error in the logs when i configure Prometheus to scrap for the data on /metrics

Seems to be going away when i stop Prometheus from scraping the data.

📝 Error Message(s) or Log

kuma  | 2024-04-16T17:51:28+02:00 [RATE-LIMIT] INFO: remaining requests: 60
kuma  | 2024-04-16T17:53:14+02:00 [RATE-LIMIT] INFO: remaining requests: 60
kuma  | 2024-04-16T17:53:44+02:00 [RATE-LIMIT] INFO: remaining requests: 60
kuma  | 2024-04-16T17:54:14+02:00 [RATE-LIMIT] INFO: remaining requests: 60
kuma  | 2024-04-16T17:54:44+02:00 [RATE-LIMIT] INFO: remaining requests: 60

🐻 Uptime-Kuma Version

1.23.11

💻 Operating System and Arch

Ubuntu 22.04 X86

🌐 Browser

Firefox 124.0.2

🖥️ Deployment Environment

  • Database: sqlite
  • number of monitors: 4

tokar86a avatar Apr 16 '24 16:04 tokar86a

You are getting these INFO-log messages to inform you that you have 60 remaining requests.

You are missing a question: what are you asking about?

CommanderStorm avatar Apr 16 '24 16:04 CommanderStorm

You are getting these INFO-log messages to inform you that you have 60 remaining requests.

You are missing a question: what are you asking about?

I am asking why i am getting this info log and it seems to be spamming it. It is somehow i can disable that sort of information or make it appear less frequent?

tokar86a avatar Apr 16 '24 16:04 tokar86a

The log message indicates that an action has been performed against a rate-limited endpoint. This is nothing to be conceared about, unless you are actually spamming a rate limited endpoint.

See https://github.com/louislam/uptime-kuma/blob/b25ac55a2f0702bbbd8b7d7fba736e962ea10d97/server/rate-limiter.js#L27

[!NOTE] An enhancement might be to not warn on the first rate-limited request. Our contribution guide is here: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md

CommanderStorm avatar Apr 16 '24 17:04 CommanderStorm

We are clearing up our old help-issues and your issue has been open for 60 days with no activity. If no comment is made and the stale label is not removed, this issue will be closed in 7 days.

github-actions[bot] avatar Aug 01 '24 00:08 github-actions[bot]