louislam / uptime-kuma

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

Modify logging lines #5051

Open nlmaz opened 2 weeks ago

nlmaz commented 2 weeks ago

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

🛡️ Security Policy

📝 Describe your problem

Hello everyone,

I would like to monitor Uptime Kuma in Wazuh and read out the log files. These currently look like this for incorrect login attempts.

“2024-08-22T18:21:42+02:00 [AUTH] WARN: Incorrect username or password for user XXXX. IP=XXX.XXX.XXX.XXX”

Now to my question. Is it possible to design the log output in such a way that I can customize it for each log entry?

“2024-08-22T18:21:42+02:00 [UPTIMEKUMA] [AUTH] WARN: Incorrect username or password for user XXXX. IP=XXX.XXX.XXX.XXX”

This allows me to set my decoder to search for [UPTIMEKUMA] and then display the logs correctly and use active-response to block the IP's.

Uptime Kuma runs on Ubuntu without Docker.
Log path is: /root/.pm2/logs/uptime-kuma-error.log

📝 Error Message(s) or Log

No response

🐻 Uptime-Kuma Version

1.23.13

💻 Operating System and Arch

Ubuntu 24.04

🌐 Browser

Chrome

🖥️ Deployment Environment

CommanderStorm commented 2 weeks ago

Is it possible to design the log output in such a way that I can customize it for each log entry?

No, and I also don't know of a software that does allow customising log lines like you want. => I can't really imaginge why you would want that.. Any log-aggregator should just keep keep track of where the logs are comming from.