Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable viewing logs when Docker version >= 20.10 #8

Open
pabloromeo opened this issue Jan 1, 2021 · 1 comment
Open

Enable viewing logs when Docker version >= 20.10 #8

pabloromeo opened this issue Jan 1, 2021 · 1 comment

Comments

@pabloromeo
Copy link

I'm currently running Swarmpit but also using Loki (using their custom log-driver) for logging from all containers.
Now those longs aren't currently available in Swarmpit.
I believe that is because the buttons are disabled when the driver is not json-file our journald.
However, the logs are indeed available using "docker service logs", since i'm running docker 20.10.1, which supports "dual logging".

https://www.docker.com/blog/introducing-docker-engine-20-10/

Starting with Docker Engine 20.10, you can use docker logs to read container logs regardless of the configured logging driver or plugin. This capability, sometimes referred to as dual logging, allows you to use docker logs to read container logs locally in a consistent format, regardless of the remote log driver used, because the Engine is configured to log information to the “local” logging driver. Refer to “Configure the default logging driver “ in the Docker documentation for additional information

Any chance to get Logs in Swarmpit enabled when available, without having to change log-drivers on the containers?

@kabnfever
Copy link

kabnfever commented Jan 3, 2023

Sorry, but something does not jive here. The Swarmpit developers indicated in issue #357 that you can only view logs in their user-interface when your stack uses either the json-file or journald logging drivers. However, if you use the Swarmpit "Swagger" interface to the Swarmpit "logs" API, you can in fact access the logs of any Docker service or task in your stack as shown in the attached image regardless of the logging driver used. Note that in the attached image this is for a stack that is using the "splunk" logging driver and which the "View Log" button is greyed out.

What is limiting the Swarmpit application from doing the same? Why is the Swarmpit UI/frontend application not doing the same call to their own APIs as the Swagger UI is doing? This does not make sense, the Swagger UI works, but the Swarmpit UI does not...even though they both are using the same/identical Swarmpit API call?

The "View Log" button should not be greyed out given that the logs can be viewed via Swarmpit's own "logs" API even when a stack is using a logging driver other than the json-file or journald logging drivers.

Swarmpit_Logs_via_Swagger_UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants