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

Docker: Log to file

Open nopoz opened this issue 2 years ago • 4 comments

⚠️ Please verify that this feature request has NOT been suggested before.

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

🏷️ Feature Request Type

Other

🔖 Feature description

Give the Docker container the ability to log to a file. I use fail2ban and it needs to read a log file that contains failed login attempts. Currently the docker log is only written to stdout and accessible by running docker logs <container name>.

✔️ Solution

Allow for an optional container environment variable that would specify where to write log data to.

❓ Alternatives

No response

📝 Additional Context

No response

nopoz avatar Sep 23 '22 23:09 nopoz

A docker container is immutable so why log to a file? Just catch the output from stdout?

pimjansen avatar Sep 29 '22 08:09 pimjansen

A docker container is immutable so why log to a file? Just catch the output from stdout?

Did you just read the title and write this reply?

nopoz avatar Sep 29 '22 17:09 nopoz

A docker container is immutable so why log to a file? Just catch the output from stdout?

Did you just read the title and write this reply?

No, but writing all application logs to file is not the way to go. If fail2ban wants a log it can also do this from stdout i assume? Though im curious on the setup of the environment to assist you in a proper design solution

pimjansen avatar Sep 29 '22 18:09 pimjansen

+1 way to save the response when the monitor fails. right now its logged in the terminal inside docker, will be nice to save that to a file.

asyba avatar Jan 09 '23 02:01 asyba

+1 Would also like to monitor Uptime Kuma's log with Fail2ban.

casudo avatar Feb 24 '23 11:02 casudo

+1 Yes, I would also like to monitor the access log of Uptime Kuma with fail2ban.

wechsler42 avatar Oct 23 '23 09:10 wechsler42

@wechsler42 @asyba @casudo

Please refrain from posting +1 / requests for updates things on issues, as this makes issue-management harder. Issues are for discussing what needs to be done how by whom. We use 👍🏻 on issues to prioritise work, as always: Pull Requests welcome.

@nopoz Docker logs can be redirected to a file via solutions like presented in https://betterstack.com/community/questions/how-to-redirect-docker-logs-to-file/

CommanderStorm avatar Oct 23 '23 11:10 CommanderStorm

Closing as resolved by https://betterstack.com/community/questions/how-to-redirect-docker-logs-to-file/ as commented above

CommanderStorm avatar Dec 07 '23 14:12 CommanderStorm