Movatterモバイル変換


[0]ホーム

URL:


Loading
  1. Elastic Docs/
  2. Reference/
  3. Ingestion tools/
  4. Fleet and Elastic Agent/
  5. Configure standalone Elastic Agents

Configure inputs for standalone Elastic Agents

Theinputs section of theelastic-agent.yml file specifies how Elastic Agent locates and processes input data.

By default Elastic Agent collects system metrics, such as CPU, memory, network, and file system metrics, and sends them to the default output. For example, to define data streams forcpu,memory,network andfilesystem metrics, this is the configuration:

- type: system/metrics  id: unique-system-metrics-id  data_stream.namespace: default  use_output: default  streams:    - metricsets:      - cpu      data_stream.dataset: system.cpu    - metricsets:      - memory      data_stream.dataset: system.memory    - metricsets:      - network      data_stream.dataset: system.network    - metricsets:      - filesystem      data_stream.dataset: system.filesystem
  1. The name of the input. Refer toElastic Agent inputs for the list of what’s available.

  2. A unique ID for the input.

  3. A user-defined namespace.

  4. The name of theoutput to use. If not specified,default will be used.

  5. The set of enabled module metricsets.Refer to the MetricbeatSystem module for a list of available options. The metricset fields can be configured.

  6. A user-defined dataset. It can contain anything that makes sense to signify the source of the data.

To enable Elastic Agent to collect log files, you can use a configuration like the following.

- type: filestream  id: your-input-id  streams:    - id: your-filestream-stream-id      data_stream:        dataset: generic      paths:        - /var/log/*.log
  1. The name of the input. Refer toElastic Agent inputs for the list of what’s available.
  2. A unique ID for the input.
  3. A unique ID for the data stream to track the state of the ingested files.
  4. The streams block is required only if multiple streams are used on the same input. Refer to the Filebeatfilestream documentation for a list of available options. Also, specifically for thefilestream input type, refer to thesimplified log ingestion for an example of ingesting a set of logs specified as an array.

The input in this example harvests all files in the path/var/log/*.log, that is, all logs in the directory/var/log/ that end with.log. All patterns supported byGo Glob are also supported here.

To fetch all files from a predefined level of subdirectories, use this pattern:/var/log/*/*.log. This fetches all.log files from the subfolders of/var/log. It does not fetch log files from the/var/log folder itself. Currently it is not possible to recursively fetch all files in all subdirectories of a directory.


[8]ページ先頭

©2009-2026 Movatter.jp