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

Edit Elastic Agent docs #19146

Merged
merged 2 commits into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions x-pack/elastic-agent/docs/elastic-agent-command-line.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[[elastic-agent-cmd-options]]
= Command line options

experimental[]

The `elastic-agent run` command provides flags that alter the behavior of an
agent:

`-path.home`::
The home directory of the {agent}. `path.home` determines the location of the
configuration files and data directory.

`-c`::
The configuration file to load. If not specified, {agent} uses
`{path.home}/elastic-agent.yml`.

`-path.data`::
The data directory used by {agent} to store downloaded artifacts. Also stores
logs for any {beats} started and managed by {agent}.
+
If not specified, {agent} uses `{path.home}/data`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[[elastic-agent-configuration-example]]
= Configuration example

experimental[]

The following example shows a full list of configuration options:

//REVIEWERS: I'm not sure whether this is a true statement ^^.

[source,yaml]
----
include::elastic-agent_configuration_example.yml[]
----
dedemorton marked this conversation as resolved.
Show resolved Hide resolved
113 changes: 113 additions & 0 deletions x-pack/elastic-agent/docs/elastic-agent-configuration.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
[[elastic-agent-configuration]]
= Configuration settings

experimental[]

By default {agent} runs in standalone mode to ingest system data and send it to
a local {es} instance running on port 9200. It uses the demo credentials of the
`elastic` user. It's also configured to monitor all {beats} managed by the agent
and send the {beats} logs and metrics to the same {es) instance.

To alter this behavior, configure the output and other configuration settings:

* <<elastic-agent-output-configuration>>
* <<elastic-agent-monitoring-configuration>>
* <<elastic-agent-datasource-configuration>>

[float]
[[elastic-agent-output-configuration]]
== Output settings

Specify one or more outputs. Specifying multiple outputs allows you to pair
each data source with a different output.

IMPORTANT: {agent} currently works with the {es} output only.

Example output configuration:

[source,yaml]
-------------------------------------------------------------------------------------
outputs:
default:
type: elasticsearch
hosts: [127.0.0.1:9200]
username: elastic
password: changeme

monitoring:
type: elasticsearch
api_key: VuaCfGcBCdbkQm-e5aOx:ui2lp2axTNmsyakw9tvNnw
hosts: ["localhost:9200"]
ca_sha256: "7lHLiyp4J8m9kw38SJ7SURJP4bXRZv/BNxyyXkCcE/M="
-------------------------------------------------------------------------------------

This example configures two outputs: `default` and `monitoring`.
Notice that they use different authentication methods. The first one uses a
username and password pair, and the second one contains an API key.

[NOTE]
==============
A default output configuration is required.
==============

[float]
[[elastic-agent-monitoring-configuration]]
== {beats} monitoring settings

{agent} monitors {beats} by default. To disable or change monitoring
settings, set options under `settings.monitoring`:

[source,yaml]
-------------------------------------------------------------------------------------
settings.monitoring:
# enabled turns on monitoring of running processes
enabled: true
# enables log monitoring
logs: true
# enables metrics monitoring
metrics: true
# specifies output to be used
use_output: monitoring
-------------------------------------------------------------------------------------


To disable monitoring, set `settings.monitoring.enabled` to `false`. When set to
`false`, {beats} monitoring is turned off, and all other options in this section
are ignored.

To enable monitoring, set `settings.monitoring.enabled` to `true`. Also set the
`logs` and `metrics` settings to control whether logs, metrics, or both are
collected. If neither setting is specified, monitoring is disabled. Set
`use_output` to specify the output to which monitoring events are sent.

[[elastic-agent-datasource-configuration]]
== Datasource settings

//TODO: provide more context here about what a data source is and how it's used.
dedemorton marked this conversation as resolved.
Show resolved Hide resolved

By default {agent} collects system metrics, such as cpu, memory, network, and
filesystem metrics, and sends them to the default output. For example:


[source,yaml]
-------------------------------------------------------------------------------------
datasources:
- namespace: default
use_output: default
inputs:
- type: system/metrics
streams:
- metricset: cpu
dataset: system.cpu
- metricset: memory
dataset: system.memory
- metricset: network
dataset: system.network
- metricset: filesystem
dataset: system.filesystem
-------------------------------------------------------------------------------------

If `use_output` is not specified, the `default` output is used.

For more examples, see
<<elastic-agent-configuration-example,`elastic-agent_configuration_example.yml`>>.
Loading