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

Custom Group labeled services/containers to appear on Host's panel when not multi-host/swarm services. #3471

Open
skyscooby opened this issue Dec 19, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@skyscooby
Copy link

Describe the feature you would like to see

Continued from convo in #3467.

This is a request for 'Custom Groups' to appear in the 'Host' Panel when those custom labels are attached to services with a single container or replica. Perhaps it's possible to detect if swarm mode has been init on the dockerd and use Swarm Mode slider only when it has been enabled.

Custom group labelled services should appear at the top of the tree because if they have been created then they are almost certainly of interest to the user as it takes extra effort to create and organise them.

Describe how you would like to see this feature implemented

This would just be a behaviour change in the UI and perhaps small tweaks in the backend if necessary for the UI to know about swarm mode being init'd on the dockerd.

Describe any alternatives you've considered

The alternative is to use an external webpage/dashboard and link directly into /group/name at the dozzle URI.

@skyscooby skyscooby added the enhancement New feature or request label Dec 19, 2024
@amir20
Copy link
Owner

amir20 commented Dec 19, 2024

Thinking about this a little more, it's confusing to have one URL for swarm and host mode. What I mean is that, /group/name would go to Swarm Mode. While /group/name?host=foo would also be accessible in host mode. This wouldn't work.

PErhaps, it should be a different URL for host mode vs swarm mode, eg /group/name and something else for host mode.

More complicated than I thought now to implement this.

@skyscooby
Copy link
Author

I think the issue is that Dozzle groups should just be a list of containers and their respective source dockerd instance/agents, regardless if they are individual containers or services with a hundred repicas.. in the end they can still be grouped together and result in a simple list of containers in a custom group name the user has decided should trump any other ideas Dozzle has about organising them.. although they can still exist in other folders too where it makes sense...

Regarding services maybe /service/name should exist (if it doesn't already?) for access to services which actually align with Swarm... It's also possible to leave the Swarm mode and custom groups just the way it is today.. but only activate that if docker swarm mode is actually in use.. if it's not active on the daemon I don't think you can even have replicas in your compose file at all and it would not be confusing at all for the Custom groups in this case to sit where the Swarm Slider sits..

@amir20
Copy link
Owner

amir20 commented Dec 21, 2024

I think the issue is that Dozzle groups should just be a list of containers and their respective source dockerd instance/agents, regardless if they are individual containers or services with a hundred repicas.. in the end they can still be grouped together and result in a simple list of containers in a custom group name the user has decided should trump any other ideas Dozzle has about organising them.. although they can still exist in other folders too where it makes sense...

I am having a bit of a hard time understanding this. Dozzle already groups by host/agent.

Regarding services maybe /service/name should exist (if it doesn't already?) for access to services which actually align with Swarm... It's also possible to leave the Swarm mode and custom groups just the way it is today.. but only activate that if docker swarm mode is actually in use.. if it's not active on the daemon I don't think you can even have replicas in your compose file at all and it would not be confusing at all for the Custom groups in this case to sit where the Swarm Slider sits

That's right. You can only create services if swarm has been initialized on the host. However, the nice part of groups is that they work across hosts. So if you had 3 hosts with custom labels, you can create your own custom group across all hosts to merge the logs and stats. This is a powerful feature I use personally.

I think at the end of the day, custom groups make sense in both modes. I'll think about it more in 2025.

@skyscooby
Copy link
Author

I am having a bit of a hard time understanding this. Dozzle already groups by host/agent.

Totally understand... and it's probably not clear the intent behind these requests.. YES, Dozzle groups by host/agent but those groups do not behave the same as custom groups in terms of watching the logs.. when I choose a host and toggle on the "Merge into one view" button.. any containers that I rebuild as I'm working fall off this stream, even tho they are restarted on the same host.. I'm not sure if this is a bug or intended.. but the merge button deactivates and I need to click it again after every build to keep watching them.. (ie I get 'Container Stopped' events but not 'Container started' Events.) It's almost like a 'temporary' group is created when the Merge button is clicked but it is not dynamic and does not continue to add new containers to the stream as they appear.. it just turns itself off when any state change happens.. if you think this is a bug LMK and I can create a different issue to address that.

When I rebuild any container with a custom group I get a 'Container stopped' message followed by a 'Container started' message and I can simply watch the logs and not manhandle the Dozzle UI.. (aside from having to switch the Swarm toggle back and forth to switch between my custom group and individual containers that might not be in that group..)

This is a powerful feature I use personally.

I can totally see that being powerful, and I wouldn't suggest changing that at all... only suggesting scoping the Swarm mode panel to only be shown when people are actually using Docker Swarm.. this is less confusing to users. I assume your analytics provide some insight but I suspect the majority of Dozzle instances are not swarm enabled so there is a benefit to streamlining the experience for those single dockerd instance users.

I'll think about it more in 2025.

Happy holidays! and thank you for being such an active member of the open source community!

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

No branches or pull requests

2 participants