- Observability: other versions:
- What is Elastic Observability?
- What’s new in 8.12
- Get started
- Observability AI Assistant
- Application performance monitoring (APM)
- Self manage APM Server
- Data Model
- Features
- How-to guides
- OpenTelemetry integration
- Manage storage
- Configure
- Advanced setup
- Secure communication
- Monitor
- API
- Troubleshoot
- Upgrade
- Release notes
- Known issues
- Logs
- Infrastructure monitoring
- AWS monitoring
- Synthetic monitoring
- Get started
- Scripting browser monitors
- Configure lightweight monitors
- Manage monitors
- Work with params and secrets
- Analyze monitor data
- Monitor resources on private networks
- Use the CLI
- Configure projects
- Configure Synthetics settings
- Grant users access to secured resources
- Manage data retention
- Use Synthetics with traffic filters
- Migrate from the Elastic Synthetics integration
- Scale and architect a deployment
- Synthetics support matrix
- Synthetics Encryption and Security
- Troubleshooting
- Uptime monitoring
- Real user monitoring
- Universal Profiling
- Alerting
- Service-level objectives (SLOs)
- Cases
- CI/CD observability
- Troubleshooting
- Fields reference
- Tutorials
- Monitor Amazon Web Services (AWS) with Elastic Agent
- Monitor Amazon Web Services (AWS) with Beats
- Monitor Google Cloud Platform
- Monitor a Java application
- Monitor Kubernetes
- Monitor Microsoft Azure with Elastic Agent
- Monitor Microsoft Azure with the Azure Native ISV Service
- Monitor Microsoft Azure with Beats
Delete sensitive data
editDelete sensitive data
editIf you accidentally ingest sensitive data, follow these steps to remove or redact the offending data:
- Stop collecting the sensitive data. Use the remedy column of the sensitive fields table to determine how to stop collecting the offending data.
-
Delete or redact the ingested data. With data collection fixed, you can now delete or redact the offending data:
Redact specific fields
editTo redact sensitive data in a specific field, use the update by query API.
For example, the following query removes the client.ip
address
from APM documents in the logs-apm.error-default
data stream:
POST /logs-apm.error-default/_update_by_query { "query": { "exists": { "field": "client.ip" } } "script": { "source": "ctx._source.client.ip = params.redacted", "params": { "redacted": "[redacted]" } } }
Or, perhaps you only want to redact IP addresses from European users:
POST /logs-apm.error-default/_update_by_query { "query": { "term": { "client.geo.continent_name": { "value": "Europe" } } }, "script": { "source": "ctx._source.client.ip = params.redacted", "params": { "redacted": "[redacted]" } } }
See update by query API for more information and examples.
Delete Elasticsearch documents
editThis will permanently delete your data. You should test your queries with the search API prior to deleting data.
To delete an Elasticsearch document, you can use the delete by query API.
For example, to delete all documents in the apm-traces-*
data stream with a user.email
value, run the following query:
POST /apm-traces-*/_delete_by_query { "query": { "exists": { "field": "user.email" } } }
See delete by query API for more information and examples.