Field Mappings
Sigma rules use standardized field names. Your logs likely use different names. Field mappings translate between them.Why Field Mappings?
Sigma rule:CommandLine → process.command_line
Without mappings, the rule can’t find the field.
ECS (Elastic Common Schema)
CHAD uses ECS as its mapping framework. ECS provides standardized field names for common security data.Common ECS Mappings
| Sigma Field | ECS Field | Description |
|---|---|---|
CommandLine | process.command_line | Process command line |
User | user.name | Username |
SourceIP | source.ip | Source IP address |
DestinationIP | destination.ip | Destination IP |
FileName | file.name | File name |
FilePath | file.path | Full file path |
ProcessId | process.pid | Process ID |
ParentProcessId | process.parent.pid | Parent process ID |
EventID | event.code | Windows Event ID |
TargetFilename | file.path | Target file path |
Configuring Mappings
Field mappings are configured per index pattern. Each log source can have its own mappings to match its schema.Adding Mappings
- Navigate to Index Patterns
- Open the index pattern you want to configure
- Click Field Mappings tab
- Click Add Mapping
- Enter:
- Sigma Field: The field name used in Sigma rules (e.g.,
CommandLine) - Target Field: Your actual log field (e.g.,
process.command_line)
- Sigma Field: The field name used in Sigma rules (e.g.,
- Save
Auto-Correction
CHAD automatically handles text field keyword suffixes:- If you map to a text field, CHAD adds
.keywordautomatically for exact matching - Field existence is validated against the actual OpenSearch index
Mapping Types
Direct Mapping
Simple one-to-one mapping:Nested Fields
Use dot notation for nested JSON:CommandLine → process.command_line
Array Fields
If your field is an array, mappings still work:|contains and |all handle arrays.
AI-Assisted Mapping
CHAD can suggest mappings using AI:- Go to Settings > AI Mapping
- Configure AI provider (Ollama, OpenAI, Anthropic)
- When adding mappings, click Suggest
- AI analyzes your index schema and suggests matches
AI suggestions require sending field names to the AI provider. Review your data privacy requirements.
Testing Mappings
Validate mappings work correctly:- Create or edit a rule
- Click Validate
- CHAD checks all fields exist in the index
- Errors show which fields are unmapped
Validation Errors
| Error | Meaning | Solution |
|---|---|---|
| Field not found | No mapping exists | Add field mapping |
| Field type mismatch | Incompatible type | Check mapping target |
| Index pattern not configured | No index for logsource | Create index pattern |
Common Scenarios
Windows Event Logs (Winlogbeat)
Sysmon
Linux Auditd
Network Logs (Zeek)
Bulk Import
Import mappings from a CSV:- Go to Field Mappings
- Click Import
- Upload CSV with columns:
sigma_field,your_field - Review and confirm
- Click Export
- Download CSV
- Edit externally
- Re-import
Best Practices
Start with ECS
Start with ECS
If your logs use ECS already, you need fewer custom mappings.
Map before importing
Map before importing
Configure field mappings before importing SigmaHQ rules.
Test with real logs
Test with real logs
Validate rules against actual logs, not just schema.
Document custom mappings
Document custom mappings
Note why non-standard mappings exist.
Review after schema changes
Review after schema changes
If your log schema changes, update mappings.
Troubleshooting
Rule validation fails
- Check the field name in the error
- Add mapping for that field
- Re-validate
Rule matches nothing
- Verify mapping targets exist in your logs
- Check for typos in field names
- Test with sample log
Mapping not applied
- Verify the mapping exists on the correct index pattern
- Check the rule is deployed to that index pattern
- Ensure the Sigma field name matches exactly (case-sensitive)