elastic / elastic-agent-shipper

Data shipper for the Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.
Other
9 stars 17 forks source link

Prototype running the shipper under agent using the V1 protocol #46

Closed cmacknz closed 2 years ago

cmacknz commented 2 years ago

The agent V2 protocol is what the final version of the shipper should use, but given that it is still under development we should attempt to integrate with the agent as it exists today with the V1 protocol. The V1 version of the protocol is defined in the same proto file as V2: https://github.com/elastic/elastic-agent-client/blob/main/elastic-agent-client.proto

For reference the beats V1 client implementation can be found in the x-pack/libbeat directory: https://github.com/elastic/beats/tree/main/x-pack/libbeat/management

To allow the agent to run the shipper binary, we must define a spec file for it defining how to start the process and how to transform the agent policy into a format the shipper can understand. See the one for metricbeat as an example: https://github.com/elastic/elastic-agent/blob/main/internal/spec/metricbeat.yml

The shipper should be provided the monitoring and output sections of a policy verbatim.

fearful-symmetry commented 2 years ago

PR here for the initial agent-side changes: https://github.com/elastic/elastic-agent/pull/561

fearful-symmetry commented 2 years ago

shipper-side code here: https://github.com/elastic/elastic-agent-shipper/pull/59