Create Monitors to Alert on Sensitive Data
이 페이지는 아직 한국어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우
언제든지 연락주시기 바랍니다.Overview
After setting up Sensitive Data Scanner to detect and redact sensitive information in your telemetry data, you can create monitors to alert when sensitive data matches are detected. This helps you:
- Detect when sensitive data is being logged or transmitted unexpectedly
- Alert security and compliance teams to potential data exposure
- Track sensitive data volume trends over time
- Identify services or teams that need additional security guidance
When Sensitive Data Scanner detects a match, it automatically adds tags to the data that you can use to create targeted monitors. This guide shows you how to create monitors that alert on sensitive data detected across logs, APM traces, and RUM events.
Prerequisites
Before creating monitors that alert on sensitive data, ensure you have:
- Sensitive Data Scanner configured with scanning groups and scanning rules. See Set up Sensitive Data Scanner for more information.
- The appropriate monitor creation permissions in your Datadog account.
- An understanding of which types of sensitive data are most critical for your organization to monitor.
Create monitors by data type
Sensitive Data Scanner works across multiple Datadog products: Logs, APM, and RUM. The process for creating monitors differs slightly depending on which data type you’re monitoring.
Logs
To create a log monitor for sensitive data matches:
- Navigate to Monitors > New Monitor > Logs.
- In the Define the search query section, add the
sensitive_data:* tag to scope your monitor to all logs that contain sensitive data matches.- To scope to specific types of sensitive data, use domain-specific tags such as
sensitive_data_category:credit_card for financial data or sensitive_data_category:pii for personally identifiable information (PII).
- Configure the alert conditions based on your needs:
- Threshold: Set a threshold for the number of matches over a time period (for example, alert when more than 10 sensitive data matches occur within five minutes).
- Group by: Group by
service, env, or team to identify which services are logging sensitive data.
- Configure notifications to alert the appropriate security or compliance teams.
- Add a descriptive monitor message that includes:
- Which type of sensitive data was detected
- Recommended remediation steps (for example, “Review application code to remove sensitive data from logs”)
- Links to relevant documentation or runbooks
Monitor for credit card data in production logs
Use this query to monitor all production logs for credit card matches: sensitive_data_category:credit_card env:prod
If you want to be more specific, you can use individual rule tags: sensitive_data:visa_credit_card env:prod
Monitor for multiple PII types
To reduce false positives, scope your query to multiple specific rule types within a domain:(sensitive_data:us_social_security_number OR sensitive_data:us_passport) env:prod
APM
To create an APM monitor for sensitive data in traces:
- Navigate to Monitors > New Monitor > APM.
- Select Trace Analytics as the monitor type.
- In the Define the search query section, add the
sensitive_data:* tag to scope your monitor to traces containing sensitive data.- Use
sensitive_data_category:* tags to scope to specific categories of sensitive data.
- Configure the alert conditions:
- Threshold: Set appropriate thresholds based on your expected trace volume.
- Group by: Group by
service, resource, or env to identify which services or endpoints are transmitting sensitive data.
- Configure notifications and add a monitor message with remediation guidance.
Monitor for API keys in APM spans
Use this query to monitor for credentials detected in APM spans: sensitive_data_category:credentials env:prod.
If you want to scope to specific credential types, such as AP keys or AWS access keys, use this query:(sensitive_data:aws_access_key OR sensitive_data:api_key) service:checkout-service
RUM
To create a RUM monitor for sensitive data in events:
- Navigate to Monitors > New Monitor > RUM.
- In the Define the search query section, add the
sensitive_data:* tag to scope your monitor to RUM events containing sensitive data. - Configure the alert conditions:
- Threshold: Set appropriate thresholds for sensitive data matches in user sessions.
- Group by: Group by
application.name, view.name, or geo.country to identify where sensitive data is being captured.
- Configure notifications and add a monitor message.
Monitor for email addresses in RUM events
Use this query to monitor for email address detected in RUM events: sensitive_data:email_address application.name:checkout-app
Best practices
Scope to domain-specific rule sets
To avoid alert fatigue from false positives, scope your monitors to specific domains relevant to your organization. For example:
- Financial services: Use
sensitive_data_category:credit_card to monitor payment card data. - PII: Use
sensitive_data_category:pii to monitor for personally identifiable data. - SaaS applications: Use
sensitive_data_category:credentials to monitor API keys and tokens.
Combine sensitive data tags with service-specific tags to create targeted monitors, for example: sensitive_data_category:credit_card service:payment-service env:prod
This approach helps you:
- Reduce noise by focusing on high-risk services
- Route alerts to the appropriate teams
- Identify patterns in which services are logging sensitive data
Set appropriate thresholds
Start with conservative thresholds and adjust based on your baseline:
- Monitor sensitive data matches for 1-2 weeks without alerts to establish a baseline.
- Set thresholds above your normal baseline to catch anomalies.
- For critical data types (for example, credit cards and SSNs), consider setting thresholds lower or alerting on any match.
Use Case Management to track alert investigations
When a sensitive data monitor triggers, use Case Management to:
- Track the investigation process
- Document remediation steps taken
- Link related incidents or findings
- Collaborate with security and engineering teams
Further Reading