Monitoring output of "docker logs" command

Hello, is there a way how to monitor output of “docker logs CONTAINER” command.
I would like to parse the output for example for strings like error or similar. So far I did not find any straightforward solution.
Thanks for giving me hint for the right direction!

I was also looking for a solution.

I could not find a ready made rule for docker container but there are some other options you can try.

  1. Install checkmk agent inside the container and configure the agent to read the e.g var/log/syslog (probably a ubuntu base image is required for that)

  2. Create a .sh script with your docker log command, save it in local/bin on the checkmk server. Run it as alternative program instead of the agent access. That will require that you create a dummy host to assign this rule to.

  3. Write a special agent which reads the docker log command. That would be the most flexible option but requires also the most work.

  4. You can pipe the log output to a file on your docker host and read the logfile with the check mk logwatch rule from the docker host.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.