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

opamp server connect multiple supervisor #37132

Open
thisishoon opened this issue Jan 10, 2025 · 1 comment
Open

opamp server connect multiple supervisor #37132

thisishoon opened this issue Jan 10, 2025 · 1 comment
Labels
cmd/opampsupervisor needs triage New item requiring triage

Comments

@thisishoon
Copy link

thisishoon commented Jan 10, 2025

Component(s)

cmd/opampsupervisor

Describe the issue you're reporting

I want to manage multiple agents through opamp supervisor. However, I currently know that one supervisor can only run one agent. Supporting multiple agents is future work. So, I want to run one supervisor per agent and run multiple supervisors on one opamp server. I think then I can manage multiple agents. I would like to ask whether the opamp server can be connected to multiple supervisors.

opamp server : supervisor = 1 : N
supervisor : agent = 1 : 1

I modified the fixed instance ID 01942b7e-be22-7deb-8fe4-ad1dc54e0909 created by Supervisor to effective.yaml and persistent_state.yaml. and I ran additional Supervisor. the existing supervisor is connected to the opamp server.

{"level":"error","ts":1736489039.7722535,"logger":"supervisor.opamp-server","caller":"supervisor/logger.go:26","msg":"Cannot read a message from WebSocket: read tcp 127.0.0.1:38217->127.0.0.1:44208: read: connection reset by peer","stacktrace":"github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor.(*opAMPLogger).Errorf\n\t{masking}\ngithub.com/open-telemetry/opamp-go/server.(*server).handleWSConnection\n\t/home1/irteam/go/pkg/mod/github.com/open-telemetry/[email protected]/server/serverimpl.go:237"}
{"level":"info","ts":1736489039.7728827,"logger":"supervisor","caller":"supervisor/supervisor.go:220","msg":"Supervisor starting","id":"01942b7e-be22-7deb-8fe4-ad1dc54e1111"}

It seems that a websocket connection reset occurred with the opamp server, but when I connect to the client of the opamp server, the additional agent is registered. remote configure settings are also possible.
was the websocket connection established through retry after the Cannot read a message from WebSocket error occurred at first?

Another question, when I run supervisor, the settings in the effective.yaml file are always the same and fixed. Is it not possible to run it with the settings file I specified every time I run it for the first time?

I think that effective.yaml file by combining the files in templates https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/5ee95c6f8b886f24070b2938c3418d1cbbbeadd0/cmd/opampsupervisor/supervisor/templates. If I change the file in templates, the agent's effective.yaml file created when running suervisor will change, right?

@thisishoon thisishoon added the needs triage New item requiring triage label Jan 10, 2025
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/opampsupervisor needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

1 participant