<commit_before>[role="xpack"]
[[monitoring-settings]]
=== Monitoring settings in Elasticsearch
++++
<titleabbrev>Monitoring settings</titleabbrev>
++++

By default, monitoring is enabled but data collection is disabled. To enable
data collection, use the `xpack.monitoring.collection.enabled` setting.

You can configure these monitoring settings in the `elasticsearch.yml` file. You
can also dynamically set some of these settings using the
<<cluster-update-settings,cluster update settings API>>.

TIP: Cluster settings take precedence over settings in the `elasticsearch.yml`
file.

To adjust how monitoring data is displayed in the monitoring UI, configure
{kibana-ref}/monitoring-settings-kb.html[`xpack.monitoring` settings] in
`kibana.yml`. To control how monitoring data is collected from
Logstash, configure
{logstash-ref}/configuring-logstash.html#monitoring-settings[`xpack.monitoring` settings]
in `logstash.yml`.

For more information, see<commit_msg>Update link to ls monitoring settings (#47529)<commit_after>[role="xpack"]
[[monitoring-settings]]
=== Monitoring settings in Elasticsearch
++++
<titleabbrev>Monitoring settings</titleabbrev>
++++

By default, monitoring is enabled but data collection is disabled. To enable
data collection, use the `xpack.monitoring.collection.enabled` setting.

You can configure these monitoring settings in the `elasticsearch.yml` file. You
can also dynamically set some of these settings using the
<<cluster-update-settings,cluster update settings API>>.

TIP: Cluster settings take precedence over settings in the `elasticsearch.yml`
file.

To adjust how monitoring data is displayed in the monitoring UI, configure
{kibana-ref}/monitoring-settings-kb.html[`xpack.monitoring` settings] in
`kibana.yml`. To control how monitoring data is collected from
Logstash, configure
{logstash-ref}/monitoring-internal-collection.html#monitoring-settings[`xpack.monitoring` settings]
in `logstash.yml`.

For more information, see
{'fraction_non_alphanumeric': 0.0943683409436834, 'fraction_numerical': 0.0025367833587011668, 'mean_word_length': 6.197080291970803, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4887303', 'n_tokens_mistral': 547, 'n_tokens_neox': 524, 'n_words': 197}