This guide provides brief guidance on mapping data to schemas other than OCSF. While OCSF is the recommended choice for security data, you may need to support Elastic Common Schema (ECS), Google UDM, or Microsoft ASIM for integration with specific platforms.
Choosing a schema
Section titled “Choosing a schema”| Schema | Best For | Considerations |
|---|---|---|
| OCSF | Security data normalization | Vendor-neutral, comprehensive security focus |
| ECS | Elasticsearch/Elastic Stack | Tight Elastic integration, good field coverage |
| UDM | Google SecOps (Chronicle) | Required for Chronicle, maps well from OCSF |
| ASIM | Microsoft Sentinel | Required for Sentinel, KQL-optimized |
Elastic Common Schema (ECS)
Section titled “Elastic Common Schema (ECS)”ECS is Elastic’s open schema for structured data in Elasticsearch.
Key differences from OCSF
Section titled “Key differences from OCSF”- Field names use dots instead of nesting:
source.ipvssrc_endpoint.ip - Less prescriptive about field values
- Wider scope (not security-specific)
Mapping pattern
Section titled “Mapping pattern”// From OCSF to ECSecs.source.ip = ocsf.src_endpoint.ipecs.source.port = ocsf.src_endpoint.portecs.destination.ip = ocsf.dst_endpoint.ipecs.destination.port = ocsf.dst_endpoint.portecs.event.category = ["network"]ecs.event.type = ["connection"]ecs.network.protocol = ocsf.connection_info.protocol_nameecs.network.bytes = ocsf.traffic.total_bytesecs.@timestamp = ocsf.timeECS field sets
Section titled “ECS field sets”Common ECS field sets for security data:
event.*- Event metadata and classificationsource.*/destination.*- Network endpointsprocess.*- Process informationfile.*- File metadatauser.*- User informationhost.*- Host/device detailsthreat.*- Threat intelligence
Google Unified Data Model (UDM)
Section titled “Google Unified Data Model (UDM)”UDM is Google Chronicle’s (SecOps) event schema. Refer to the UDM field list for a complete reference.
Key differences from OCSF
Section titled “Key differences from OCSF”- Uses protobuf-style nested structures
- Strict typing with enums for many fields
- Event type determines required field sets
Mapping pattern
Section titled “Mapping pattern”// From OCSF to UDMudm.metadata.event_timestamp = ocsf.timeudm.metadata.event_type = "NETWORK_CONNECTION"udm.principal.ip = [ocsf.src_endpoint.ip]udm.principal.port = ocsf.src_endpoint.portudm.target.ip = [ocsf.dst_endpoint.ip]udm.target.port = ocsf.dst_endpoint.portudm.network.ip_protocol = ocsf.connection_info.protocol_name.to_upper()UDM entity types
Section titled “UDM entity types”principal- Initiating entity (source)target- Target entity (destination)src- Alternative source (for multi-party events)observer- Monitoring/logging entityintermediary- Proxy or middlebox
Microsoft ASIM
Section titled “Microsoft ASIM”ASIM (Advanced Security Information Model) is Microsoft Sentinel’s normalization schema.
Key differences from OCSF
Section titled “Key differences from OCSF”- Designed for KQL queries
- Uses specific parser naming conventions
- Column-oriented naming style
Mapping pattern
Section titled “Mapping pattern”// From OCSF to ASIM Network Sessionasim.EventType = "NetworkSession"asim.EventProduct = ocsf.metadata.product.nameasim.EventVendor = ocsf.metadata.product.vendor_nameasim.TimeGenerated = ocsf.timeasim.SrcIpAddr = ocsf.src_endpoint.ipasim.SrcPortNumber = ocsf.src_endpoint.portasim.DstIpAddr = ocsf.dst_endpoint.ipasim.DstPortNumber = ocsf.dst_endpoint.portasim.NetworkProtocol = ocsf.connection_info.protocol_nameasim.NetworkBytes = ocsf.traffic.total_bytesASIM schemas
Section titled “ASIM schemas”ASIM provides schemas for:
- Network sessions
- Authentication events
- DNS activity
- Web sessions
- Process events
- File activity
- Audit events
Translation strategies
Section titled “Translation strategies”Direct field mapping
Section titled “Direct field mapping”When fields have direct equivalents:
ecs.source.ip = ocsf.src_endpoint.ipValue transformation
Section titled “Value transformation”When values need conversion:
// OCSF uses integers, ECS might use stringsecs.event.severity = ocsf.severity_id.string()
// Protocol name case differencesudm.network.ip_protocol = ocsf.connection_info.protocol_name.to_upper()Structural transformation
Section titled “Structural transformation”When structure differs:
// OCSF nested to ECS flatecs.source.ip = ocsf.src_endpoint.ipecs.source.port = ocsf.src_endpoint.portecs.source.bytes = ocsf.traffic.bytes_outEnum mapping
Section titled “Enum mapping”When schemas use different enumerations:
let $severity_map = { 1: "low", 2: "medium", 3: "high", 4: "critical",}ecs.event.severity_name = $severity_map[ocsf.severity_id]Maintaining multiple schemas
Section titled “Maintaining multiple schemas”If you need to support multiple target schemas:
- Normalize to OCSF first as your canonical format
- Create translator operators for each target schema
- Branch pipelines based on destination
// Central normalizationfrom_kafka "raw-events"my_source::ocsf::map // Normalize to OCSF
// Branch to different destinationsfork { // Send OCSF to data lake to_kafka "ocsf-events"}fork { // Translate and send to Elasticsearch ocsf_to_ecs to_elasticsearch "..."}fork { // Translate and send to Chronicle ocsf_to_udm to_google_secops "..."}Best practices
Section titled “Best practices”-
Start with OCSF: It’s designed for security data and translates well to other schemas.
-
Document mapping decisions: Record why you chose specific field mappings, especially for ambiguous cases.
-
Test with real data: Each schema has quirks that only surface with production data.
-
Maintain translator operators: Package schema translations as reusable operators.
-
Monitor for schema updates: All schemas evolve; plan for periodic updates to your mappings.