-
Notifications
You must be signed in to change notification settings - Fork 17
Support monitoring the shipper from the Elastic Agent #267
Comments
We should consider having the shipper report metrics in a format the https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-metricset-beat-stats.html |
@cmacknz I was still wondering about the whole "format like beat metrics" thing, since we also have queue metrics and stuff that's shipper-specific. Should we expand the beat/metric inputs to recognize shipper data? Just have two inputs for shipper data? |
Yes the approach to take is to use We could extend the |
Example of creating a new dataset for monitoring: elastic/kibana#149974. The list is hard coded in Fleet, without modifying Fleet the agent won't have permission to write to these indexes. We should use |
Enabling
agent.monitoring.metrics
in an agent policy will spawn a Metricbeat instance to collect metrics from processes supervised by the agent. This Metricbeat instance needs to have a module enabled to capture the shipper's CPU utilization, memory usage, and application specific metrics. The monitoring configuration for this Metricbeat instance is defined in the the v1_monitor.go file.The agent currently knows how to start both the
beat/metrics
module for monitoring beats and thehttp/metrics
module for monitoring the agent itself:https://github.com/elastic/elastic-agent/blob/f27f8d01bcb57f21903c1bc4927d7bf62ba46595/internal/pkg/agent/application/monitoring/v1_monitor.go#L786-L796
Likely the easiest path to support the shipper is to use the
http/metrics
input to collect the shipper's metrics. A recent example doing this for custom Filebeat metrics can be found in elastic/elastic-agent#2171, with the corresponding updates to the mappings in the Elastic Agent integration in elastic/integrations#5077.The shipper metrics will need to be written to a dedicated data stream if elastic/elastic-agent#1814 is not completed before this issue is completed. This will require updating the list of possible monitoring datastreams in the Fleet UI as described in that issue.
Acceptance Criteria:
agent.monitoring.metrics
causes the agent to start a Metricbeat monitoring input capable of collecting the shipper's metrics and sending them to Fleet.The work to update the Elastic Agent monitoring dashboard to account for the new metrics is captured into #54
The text was updated successfully, but these errors were encountered: