﻿---
title: Configuring stack monitoring data streams and indices
description: Monitoring data is stored in data streams or indices in Elasticsearch. The default data stream or index settings may not work for your situation. For...
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9507/deploy-manage/monitor/monitoring-data/configuring-data-streamsindices-for-monitoring
products:
  - Elastic Documentation
  - Elasticsearch
applies_to:
  - Elastic Stack: Generally available
---

# Configuring stack monitoring data streams and indices
Monitoring data is stored in data streams or indices in Elasticsearch. The default data stream or index settings may not work for your situation. For example, you might want to change index lifecycle management (ILM) settings, add custom mappings, or change the number of shards and replicas. The steps to change these settings depend on the monitoring method:
- <applies-to>Self-managed Elastic deployments: Generally available</applies-to> [Configuring stack monitoring data streams created by Elastic Agent](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9507/deploy-manage/monitor/monitoring-data/config-monitoring-data-streams-elastic-agent)
- [Configuring stack monitoring data streams created by Metricbeat](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9507/deploy-manage/monitor/monitoring-data/config-monitoring-data-streams-metricbeat)
- <applies-to>Self-managed Elastic deployments: Planned for removal, Self-managed Elastic deployments: Deprecated since 7.16</applies-to> [Configuring stack monitoring indices created by legacy collection](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9507/deploy-manage/monitor/monitoring-data/config-monitoring-indices-internal-collection)

<important>
  Changing mappings or settings can cause your monitoring dashboards to stop working correctly.
</important>