
Based on the sample logs you shared, it looks like your Zeek logs are hitting a field mapping conflict while Filebeat tries to index events into the Wazuh Indexer. The issue is with the data.id field: the Filebeat template expects it as a keyword, but in your Zeek events it is coming as an object. Because of this mismatch, Filebeat fails to index the events, and you see indexing errors for both the wazuh-alerts-* and wazuh-archives-* indices.
To resolve this, you can rename data.id only for Zeek logs (where data.log_source == "zeek") by creating a new string field like data.zeek_id, and then removing data.id to avoid the mapping conflict.
Below are the steps.
This will:
Hi,
Apologies for the late response. Based on the logs you shared, it looks like some Zeek logs are currently not being indexed in the Wazuh indexer due to field mapping conflicts. This is not related to the indexer version. The issue occurs because the Wazuh alerts and archives indices use predefined templates that map fields based on their data types for searchability.
In this case, fields such as data.version and data.service are mapped as objects in the template, while in the Zeek logs these fields arrive as strings. This mismatch causes the indexing conflict.
To avoid this, we need to handle the Zeek events before indexing by renaming the conflicting fields through an ingest pipeline. The approach below renames the data namespace to zeek when the log_source is zeek, so the fields will be indexed as zeek.service, zeek.version, and so on.
After this change, Zeek events will be indexed in the wazuh-archives index with fields such as zeek.id, zeek.version, etc., avoiding conflicts with the existing templates.
This configuration checks whether the log_source is zeek, moves all fields under the zeek namespace, and removes the original data field to prevent mapping conflicts.
I’ve tested this setup on my end, and it’s working as expected.
2026-01-22T16:08:02.448+0200 WARN [elasticsearch] elasticsearch/client.go:408 Cannot index event publisher.Event{Content:beat.Event{Timestamp:time.Time{wall:0xc254a9b05941ea0c, ext:1873106179192, loc:(*time.Location)(0x42417a0)}, Meta:{"pipeline":"filebeat-7.10.2-wazuh-archives-pipeline"}, Fields:{"agent":{"ephemeral_id":"039bbbcd-9b9f-4447-b72f-18ef0e80a74e","hostname":"siem","id":"679fdd3e-3df8-423f-872a-f72aa83e76eb","name":"siem","type":"filebeat","version":"7.10.2"},"ecs":{"version":"1.6.0"},"event":{"dataset":"wazuh.archives","module":"wazuh"},"fields":{"index_prefix":"wazuh-archives-4.x-"},"fileset":{"name":"archives"},"host":{"name":"siem"},"input":{"type":"log"},"log":{"file":{"path":"/var/ossec/logs/archives/archives.json"},"offset":939060759},"message":"{\"timestamp\":\"2026-01-22T16:08:00.449+0200\",\"agent\":{\"id\":\"001\",\"name\":\"nids\",\"ip\":\"192.168.1.203\"},\"manager\":{\"name\":\"siem\"},\"id\":\"1769090880.1218055\",\"full_log\":\"{\\\"ts\\\":1769090878.9160819,\\\"id\\\":\\\"FaVlk03NVWtDOcYi7g\\\",\\\"hashAlgorithm\\\":\\\"sha1\\\",\\\"issuerNameHash\\\":\\\"BA14A9AB8164C6AFB43C9D29383AE6F9D257ABE9\\\",\\\"issuerKeyHash\\\":\\\"944FD45D8BE4A4E2A680FEFDD8F900EFA3BE0257\\\",\\\"serialNumber\\\":\\\"0C9A81D5A03D9C9F3D63CDE87089531C\\\",\\\"certStatus\\\":\\\"good\\\",\\\"thisUpdate\\\":1768946435,\\\"nextUpdate\\\":1769547635,\\\"log_source\\\":\\\"zeek\\\"}\",\"decoder\":{\"name\":\"json\"},\"data\":{\"id\":\"FaVlk03NVWtDOcYi7g\",\"timestamp\":\"1769090878\",\"ts\":\"1769090878.916082\",\"hashAlgorithm\":\"sha1\",\"issuerNameHash\":\"BA14A9AB8164C6AFB43C9D29383AE6F9D257ABE9\",\"issuerKeyHash\":\"944FD45D8BE4A4E2A680FEFDD8F900EFA3BE0257\",\"serialNumber\":\"0C9A81D5A03D9C9F3D63CDE87089531C\",\"certStatus\":\"good\",\"thisUpdate\":\"1768946435\",\"nextUpdate\":\"1769547635\",\"log_source\":\"zeek\"},\"location\":\"/opt/zeek/logs/current/ocsp.log\"}","service":{"type":"wazuh"}}, Private:file.State{Id:"native::3150488-64513", PrevId:"", Finished:false, Fileinfo:(*os.fileStat)(0xc0000d96c0), Source:"/var/ossec/logs/archives/archives.json", Offset:939061731, Timestamp:time.Time{wall:0xc254a7dc1ea4a97c, ext:196536619, loc:(*time.Location)(0x42417a0)}, TTL:-1, Type:"log", Meta:map[string]string(nil), FileStateOS:file.StateOS{Inode:0x301298, Device:0xfc01}, IdentifierName:"native"}, TimeSeries:false}, Flags:0x1, Cache:publisher.EventCache{m:common.MapStr(nil)}} (status=400): {"type":"mapper_parsing_exception","reason":"object mapping for [zeek.id] tried to parse field [id] as object, but found a concrete value"}
Is it some kind of an issue, or I can just leave it?
Hi,
This error is happening because the Zeek logs you’re ingesting are not consistent in structure.
In the earlier logs you shared, data.id was an object. Based on that, the pipeline was updated to handle data.id as an object, and events with data.id as an object started indexing successfully.
Now the new log format is different: data.id appears as a string. Since the pipeline (and index mapping) expects data.id to be an object, these events fail to index due to a field mapping conflict.
To fix this, the pipeline needs to handle both cases (object and string) safely.
Only applies when data.log_source is zeek
Moves data.* into zeek.*
Handles data.id safely:
Removes data to avoid future conflicts
I tested this approach on my end and it worked correctly.
Hi,
Apologies for the late response. This issue is not occurring because of the log_source = zeek field that you added externally. There is no need to remove this field. In fact, this field is required because the pipeline uses it to decide when and how to rename fields during indexing. The pipeline checks the value of this field and applies the field transformation accordingly.
The real issue is caused by inconsistent field data types.
For example, in the previous case I mentioned, the field data.id appears with different data types depending on the log type:
Wazuh indexer cannot index the same field with two different data types, and this is what causes the mapping conflict.
To resolve this, we implemented a different approach in the custom script I shared. The script checks the data type of data.id:
If data.id is an object, it is indexed correctly by only changing the namespace from data to zeek
If data.id is a string, the field name is changed from zeek.id to zeek.zeek_id, which is stored as a string and indexed safely
This avoids mapping conflicts and allows both log formats to be indexed successfully.
You can apply the same logic to other fields if similar issues occur. The Filebeat error logs will indicate which field is causing the conflict. For example, in the last error you shared, it shows:
This means that zeek.id was expected to be an object, but in the current log it is a concrete (string) value, which caused the failure.
Using this method, you can identify the problematic field from the error logs and adjust the script accordingly to handle both data types safely.