[role="xpack"]
[[ml-configuring]]
== Configuring machine learning

If you want to use {xpackml} features, there must be at least one {ml} node in
your cluster and all master-eligible nodes must have {ml} enabled. By default,
all nodes are {ml} nodes. For more information about these settings, see 
{ref}/modules-node.html#modules-node-xpack[{ml} nodes].

To use the {xpackml} features to analyze your data, you must create a job and
send your data to that job.

* If your data is stored in {es}:

** You can create a {dfeed}, which retrieves data from {es} for analysis.
** You can use {kib} to expedite the creation of jobs and {dfeeds}.

* If your data is not stored in {es}, you can
{ref}/ml-post-data.html[POST data] from any source directly to an API.

The results of {ml} analysis are stored in {es} and you can use {kib} to help
you visualize and explore the results.

For a tutorial that walks you through these configuration steps,
see <<ml-getting-started>>.

Though it is quite simple to analyze your data and provide quick {ml} results,
gaining deep insights might require some additional planning and configuration.
The scenarios in this section describe some best practices for generating useful
{ml} results and insights from your data.

* <<ml-configuring-url>>
* <<ml-configuring-aggregation>>
* <<ml-configuring-categories>>
* <<ml-configuring-pop>>
* <<ml-configuring-transform>>
* <<ml-configuring-detector-custom-rules>>

:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/ml/customurl.asciidoc
include::customurl.asciidoc[]

:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/ml/aggregations.asciidoc
include::aggregations.asciidoc[]

:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/ml/categories.asciidoc
include::categories.asciidoc[]

:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/ml/populations.asciidoc
include::populations.asciidoc[]

:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/ml/transforms.asciidoc
include::transforms.asciidoc[]

:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/ml/detector-custom-rules.asciidoc
include::detector-custom-rules.asciidoc[]