Hi Team,
I am using OpenSearch Security Analytics and facing an issue where field mappings appear during detector creation, but after saving the detector, the Field Mappings section becomes empty.
What I Did
-
Created a Doc-level detector using the Apache Access Log log type.
-
During creation, OpenSearch automatically suggested correct mappings, e.g.:
Detection rule field: http.request.url
Data source field: http.request.url
-
The “Mapped fields” section correctly showed entries.
-
After clicking Create Detector, I opened the detector → Field Mappings tab shows “No items found.”
My Log Fields (from my index)
Example log document:
client.ip: 192.168.1.100
event.created: 2025-11-18T20:37:00Z
host.hostname: test-nginx-server
http.request.method: GET
http.request.referrer: -
http.request.url: /index.php?id=1 UNION SELECT username,password FROM users
http.request.version: 1.1
http.response.body.bytes: 1234
http.response.status_code: 200
user_agent_original: Mozilla/5.0 <— Not ECS format
log_type: access
Observations
-
The field mappings suggested during the creation step are NOT stored in the detector JSON.
-
After saving the detector,
field_mappingsis empty. -
This happens even if only 1 field (e.g., http.request.url) requires mapping.
-
It seems that OpenSearch requires full ECS compatibility for all rule-required fields, and if even one field (like
user_agent_original) doesn’t match ECS (user_agent.original), then no mappings are persisted at all.
Expected Behavior
If I map one field manually, such as:
http.request.url → http.request.url
…then that mapping should persist, even if other optional ECS fields are missing.
Actual Behavior
-
Mapping shows during creation.
-
Mapping disappears after saving the detector (UI shows “No items found”).
-
The detector JSON contains
"field_mappings": [].
Questions
-
Is this the intended behavior for doc-level detectors?
(All-or-nothing ECS validation) -
Can OpenSearch allow partial mappings to persist even if other rule fields are missing?
-
Is there a recommended approach for logs that are ECS-like but not fully ECS compliant?
Environment
-
OpenSearch 3.1.0
-
Running inside Docker
-
Log Type: Apache Access
-
Index:
nginx_logs-*(custom logs)