-
Notifications
You must be signed in to change notification settings - Fork 148
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
Run Elastic Agent in otel
mode as a service
#4933
Comments
I'm not following the requirements for this issue. Setting aside the implementation details of service files, etc. for a moment, what is the user-facing behavior we want to achieve? |
As OTel is just a mode of Agent, if a user wants to run the OTel Collector as a service they need to be able to have the service start in OTel mode. edited the task to separate the problem from my various thoughts on a solution |
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
otel
mode to elastic-agent installotel
mode as a service
Chatting with @blakerouse today, it seems #5767 might already satisfy the requirements of this issue. |
Looking at #5767 it seems that the agent installation will work also for running EDOT Collector as long as the config file contains an OTel configuration. Not sure if we need to do something else in this issue, since the only thing necessary to run the collector as a service is a one-time configuration of @strawgate @ycombinator @cmacknz Any thoughts? Do you think we may need a post-install task to generate an initial OTel collector/ elastic-agent config ? |
I think this makes sense to keep as a requirement if there's no fleet enrollment. |
Yes, the upstream collector has no concept of an |
@strawgate could you expand on this? What should the requirement be? To have a sample OTel collector config instead of the "traditional" elastic-agent.yml content at the end of the |
I was just saying that the current state of this -- requiring a config file to be placed by the user before the service starts working, is fine with me |
I'll keep this open until #5767 is merged and then test the feature to make sure that everything works as expected |
We need a way to inform the user of this requirement or rather, enhancement, that Agent can be installed with an OTel configuration and not just the traditional Agent configuration. Unless @strawgate or @cmacknz have other opinions, @pchila could you work with @kilfoyle to add something about it under https://www.elastic.co/guide/en/fleet/current/elastic-agent-installation.html towards closing out this issue? |
Blocked on #5767. |
@pchila I guess you are unblocked by now. |
As an OTel user, I configure my otel.yml with my desired configuration and iterate on the output until I'm happy with what I've got. Now I want to run the Collector as a service on the device instead of as a one-off. How do i run Elastic Agent in OTel mode as a service with the desired OTel config?
More specific details:
We can run Elastic-Agent via
./otelcol
now which is great but when you finally love how everything is working you will want to stop running Elastic-Agent in OTel mode from the shell but to install Elastic-Agent and have it run in otel-mode../otelcol install
andelastic-agent install
just installs normal Elastic Agent unit/service files that do not contain theotel
subcommand before invoking elastic-agent meaning I cannot easily run Elastic-Agent in OTel-mode as a service.I need a convenient way to go from prototyping in my shell to running as a service without having to hand build services, unit files, etc.
Thoughts:
Co-opting our existing
./elastic-agent install
command to conditionally (a flag?) insert the otel subcommand into units/services seems like a reasonable way to enable installation of Elastic Agent and run it in OTel mode.Perhaps we should remove otel.yml and auto invoke otel subcommand when it's present?
Or bifurcate the unit/service files for installation via something like
./elastic-agent install --otel
and then modify the otelcol bash scripts to check ifinstall
was passed and run the new subcommand so we can avoid./otelcol install --otel
The text was updated successfully, but these errors were encountered: