Decoder/Rule stopped working

64 views
Skip to first unread message

George Xristop

unread,
Jan 7, 2026, 7:30:20 AMĀ (3 days ago)Ā Jan 7
to Wazuh | Mailing List
So i followed the wazuh blog post about the Windows Performance Counters and everything turned out fine.Ā 
But today i noticed that no alerts are being showed in the dashboard , a little look and i notice that the data that all the commands send arent being decoded/rule filtere properly.

A little head's about the set up :
All-In-One installation version 4.14.1 on Ubuntu Server 24.04LTS
A modified pipeline so that events that come from the command location to be saved in another index.

To ensure compatability i had modified the powershell command in the wodle command to be like this :Ā Ā Powershell -ExecutionPolicy Bypass -c "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; @{ winCounter = (Get-Counter '\Memory\Available MBytes').CounterSamples[0] } | ConvertTo-Json -compress"Ā Ā 

I have placed my agents on a group so that i can 'push' the configuration remotly and here is a example block :Ā 

Ā  Ā  <!-- Memory Usage -->
Ā  Ā  <wodle name="command">
Ā  Ā  Ā  <disabled>no</disabled>
Ā  Ā  Ā  <tag>MEMUsage</tag>
Ā  Ā  Ā  <command>Powershell -ExecutionPolicy Bypass -c "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; @{ winCounter = (Get-Counter '\Memory\Available MBytes').CounterSamples[0] } | ConvertTo-Json -compress"</command>
Ā  Ā  Ā  <interval>30s</interval>
Ā  Ā  Ā  <ignore_output>no</ignore_output>
Ā  Ā  Ā  <run_on_start>yes</run_on_start>
Ā  Ā  Ā  <timeout>0</timeout>
Ā  Ā  </wodle>

Now i have copy/paste the rule xml file from the blog postĀ from wazuh blogĀ and have proper permissions to that file.Ā 

Every thing when smoothly and today i noticed that the events where missing. I did run wazuh-logtest and got this output :Ā 


{"winCounter":{"Path":"\\\\desktop-f2rl06m\\network interface(realtek pcie gbe family controller)\\bytes sent/sec","InstanceName":"realtek pcie gbe family controller","CookedValue":7492.5052630534892,"RawValue":19436140508,"SecondValue":30208226216842,"MultipleCount":1,"CounterType":272696576,"Timestamp":"\/Date(1767787862598)\/","Timestamp100NSec":134122686625980000,"Status":0,"DefaultScale":4294967292,"TimeBase":10000000}}

**Phase 1: Completed pre-decoding.
Ā  Ā  Ā  Ā  full event: '{"winCounter":{"Path":"\\\\desktop-f2rl06m\\network interface(realtek pcie gbe family controller)\\bytes sent/sec","InstanceName":"realtek pcie gbe family controller","CookedValue":7492.5052630534892,"RawValue":19436140508,"SecondValue":30208226216842,"MultipleCount":1,"CounterType":272696576,"Timestamp":"\/Date(1767787862598)\/","Timestamp100NSec":134122686625980000,"Status":0,"DefaultScale":4294967292,"TimeBase":10000000}}'

**Phase 2: Completed decoding.
Ā  Ā  Ā  Ā  name: 'json'

**Phase 3: Completed filtering (rules).
Ā  Ā  Ā  Ā  id: '301000'
Ā  Ā  Ā  Ā  level: '0'
Ā  Ā  Ā  Ā  description: 'Windows Performance Counter: '
Ā  Ā  Ā  Ā  groups: '['WinCounter']'
Ā  Ā  Ā  Ā  firedtimes: '2'
Ā  Ā  Ā  Ā  mail: 'False'

As you can see the field winCounter.Path isnt being recognized and i dont know what else to do.Ā 

Here is some data from the wazuh from the alert.log file :
2026 Jan 07 12:15:08 (DESKTOP-F2RL06M) any->command_CPUUsage {"winCounter":{"Path":"\\\\desktop-f2rl06m\\processor(_total)\\% processor time","InstanceName":"_total","CookedValue":53.975300887327634,"RawValue":25220070390625,"SecondValue":134122614629090240,"MultipleCount":1,"CounterType":558957824,"Timestamp":"\/Date(1767787862909)\/","Timestamp100NSec":134122686629090000,"Status":0,"DefaultScale":0,"TimeBase":10000000}}
2026 Jan 07 12:15:08 (DESKTOP-F2RL06M) any->command_DiskFree {"winCounter":{"Path":"\\\\desktop-f2rl06m\\logicaldisk(harddiskvolume1)\\free megabytes","InstanceName":"harddiskvolume1","CookedValue":50,"RawValue":50,"SecondValue":0,"MultipleCount":1,"CounterType":65536,"Timestamp":"\/Date(1767787863377)\/","Timestamp100NSec":134122686633770000,"Status":0,"DefaultScale":0,"TimeBase":10000000}}


Any feedback is much appreciated .Also sorry for any spelling mistake Thank you.





Federico Gustavo Galland

unread,
Jan 7, 2026, 7:54:51 AMĀ (3 days ago)Ā Jan 7
to Wazuh | Mailing List
Hi George,

If the events are reaching /var/ossec/logs/alerts/alerts.log, it means that events are indeed being processed and decoded properly. The wazuh-logtest tool will sometimes fail to parse logs with complex escaping sequences like these, so let's ignore its results for now.

Since you are not seeing alerts in your dashboard, even though the engine is writing them to alerts.log, we can assume the filebeat pipeline is the culprit.


Now, in order to help you troubleshoot this, it would help to have a copy of the alerts fromĀ /var/ossec/logs/alerts/alerts.json (the json one, not the syslog type you shared already), the modified filebeat pipeline files and a copy of your filebeat log at /var/log/filebeat/filbeat

Regards,
Fede

George Xristop

unread,
Jan 7, 2026, 8:50:17 AMĀ (3 days ago)Ā Jan 7
to Wazuh | Mailing List
So i think i send the reply email wrong so let me try to rewrite it.Ā 

From my search i couldnt find any events/alerts in the alert.json log file that have the command alerts/rule matching so i may did a oopsie and mistakenly wrote alert.log instead of archived.log /archive.json So my bad here.Ā 
But here is the logs from the archive.json that i had enabled.Ā 
{"timestamp":"2026-01-07T12:57:06.092+0000","agent":{"id":"001","name":"DESKTOP-F2RL06M","ip":"192.168.2.80"},"manager":{"name":"wazuhsrv"},"id":"1767790626.17085798","full_log":"{\"winCounter\":{\"Path\":\"\\\\\\\\desktop-f2rl06m\\\\network interface(realtek pcie gbe family controller)\\\\bytes received/sec\",\"InstanceName\":\"realtek pcie gbe family controller\",\"CookedValue\":2520.202815281938,\"RawValue\":32264057835,\"SecondValue\":30233405182275,\"MultipleCount\":1,\"CounterType\":272696576,\"Timestamp\":\"\\/Date(1767790380487)\\/\",\"Timestamp100NSec\":134122711804870000,\"Status\":0,\"DefaultScale\":4294967292,\"TimeBase\":10000000}}\r","decoder":{"name":"json"},"location":"command_NetworkTrafficIn"}
{"timestamp":"2026-01-07T12:57:06.546+0000","agent":{"id":"001","name":"DESKTOP-F2RL06M","ip":"192.168.2.80"},"manager":{"name":"wazuhsrv"},"id":"1767790626.17085798","full_log":"{\"winCounter\":{\"Path\":\"\\\\\\\\desktop-f2rl06m\\\\network interface(realtek pcie gbe family controller)\\\\bytes sent/sec\",\"InstanceName\":\"realtek pcie gbe family controller\",\"CookedValue\":11169.445278284877,\"RawValue\":19452146606,\"SecondValue\":30233410038073,\"MultipleCount\":1,\"CounterType\":272696576,\"Timestamp\":\"\\/Date(1767790380972)\\/\",\"Timestamp100NSec\":134122711809720000,\"Status\":0,\"DefaultScale\":4294967292,\"TimeBase\":10000000}}\r","decoder":{"name":"json"},"location":"command_NetworkTrafficOut"}
{"timestamp":"2026-01-07T12:57:06.778+0000","agent":{"id":"001","name":"DESKTOP-F2RL06M","ip":"192.168.2.80"},"manager":{"name":"wazuhsrv"},"id":"1767790626.17085798","full_log":"{\"winCounter\":{\"Path\":\"\\\\\\\\desktop-f2rl06m\\\\logicaldisk(harddiskvolume1)\\\\free megabytes\",\"InstanceName\":\"harddiskvolume1\",\"CookedValue\":50,\"RawValue\":50,\"SecondValue\":0,\"MultipleCount\":1,\"CounterType\":65536,\"Timestamp\":\"\\/Date(1767790381204)\\/\",\"Timestamp100NSec\":134122711812040000,\"Status\":0,\"DefaultScale\":0,\"TimeBase\":10000000}}\r","decoder":{"name":"json"},"location":"command_DiskFree"}

Also the filebeat pipeline from the GET /_inject/pipeline is (the my-performance-counter index is for the windows events) :Ā 
{
Ā  "filebeat-7.10.2-wazuh-alerts-pipeline": {
Ā  Ā  "description": "Wazuh alerts pipeline",
Ā  Ā  "processors": [
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "json": {
Ā  Ā  Ā  Ā  Ā  "field": "message",
Ā  Ā  Ā  Ā  Ā  "add_to_root": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "set": {
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true,
Ā  Ā  Ā  Ā  Ā  "ignore_empty_value": true,
Ā  Ā  Ā  Ā  Ā  "field": "data.aws.region",
Ā  Ā  Ā  Ā  Ā  "value": "{{data.aws.awsRegion}}",
Ā  Ā  Ā  Ā  Ā  "override": false
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "set": {
Ā  Ā  Ā  Ā  Ā  "field": "data.aws.accountId",
Ā  Ā  Ā  Ā  Ā  "value": "{{data.aws.aws_account_id}}",
Ā  Ā  Ā  Ā  Ā  "override": false,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true,
Ā  Ā  Ā  Ā  Ā  "ignore_empty_value": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "geoip": {
Ā  Ā  Ā  Ā  Ā  "field": "data.srcip",
Ā  Ā  Ā  Ā  Ā  "target_field": "GeoLocation",
Ā  Ā  Ā  Ā  Ā  "properties": [
Ā  Ā  Ā  Ā  Ā  Ā  "city_name",
Ā  Ā  Ā  Ā  Ā  Ā  "country_name",
Ā  Ā  Ā  Ā  Ā  Ā  "region_name",
Ā  Ā  Ā  Ā  Ā  Ā  "location"
Ā  Ā  Ā  Ā  Ā  ],
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "geoip": {
Ā  Ā  Ā  Ā  Ā  "field": "data.win.eventdata.ipAddress",
Ā  Ā  Ā  Ā  Ā  "target_field": "GeoLocation",
Ā  Ā  Ā  Ā  Ā  "properties": [
Ā  Ā  Ā  Ā  Ā  Ā  "city_name",
Ā  Ā  Ā  Ā  Ā  Ā  "country_name",
Ā  Ā  Ā  Ā  Ā  Ā  "region_name",
Ā  Ā  Ā  Ā  Ā  Ā  "location"
Ā  Ā  Ā  Ā  Ā  ],
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "geoip": {
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true,
Ā  Ā  Ā  Ā  Ā  "field": "data.aws.sourceIPAddress",
Ā  Ā  Ā  Ā  Ā  "target_field": "GeoLocation",
Ā  Ā  Ā  Ā  Ā  "properties": [
Ā  Ā  Ā  Ā  Ā  Ā  "city_name",
Ā  Ā  Ā  Ā  Ā  Ā  "country_name",
Ā  Ā  Ā  Ā  Ā  Ā  "region_name",
Ā  Ā  Ā  Ā  Ā  Ā  "location"
Ā  Ā  Ā  Ā  Ā  ],
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "geoip": {
Ā  Ā  Ā  Ā  Ā  "target_field": "GeoLocation",
Ā  Ā  Ā  Ā  Ā  "properties": [
Ā  Ā  Ā  Ā  Ā  Ā  "city_name",
Ā  Ā  Ā  Ā  Ā  Ā  "country_name",
Ā  Ā  Ā  Ā  Ā  Ā  "region_name",
Ā  Ā  Ā  Ā  Ā  Ā  "location"
Ā  Ā  Ā  Ā  Ā  ],
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true,
Ā  Ā  Ā  Ā  Ā  "field": "data.aws.client_ip"
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "geoip": {
Ā  Ā  Ā  Ā  Ā  "field": "data.aws.service.action.networkConnectionAction.remoteIpDetails.ipAddressV4",
Ā  Ā  Ā  Ā  Ā  "target_field": "GeoLocation",
Ā  Ā  Ā  Ā  Ā  "properties": [
Ā  Ā  Ā  Ā  Ā  Ā  "city_name",
Ā  Ā  Ā  Ā  Ā  Ā  "country_name",
Ā  Ā  Ā  Ā  Ā  Ā  "region_name",
Ā  Ā  Ā  Ā  Ā  Ā  "location"
Ā  Ā  Ā  Ā  Ā  ],
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "geoip": {
Ā  Ā  Ā  Ā  Ā  "field": "data.aws.httpRequest.clientIp",
Ā  Ā  Ā  Ā  Ā  "target_field": "GeoLocation",
Ā  Ā  Ā  Ā  Ā  "properties": [
Ā  Ā  Ā  Ā  Ā  Ā  "city_name",
Ā  Ā  Ā  Ā  Ā  Ā  "country_name",
Ā  Ā  Ā  Ā  Ā  Ā  "region_name",
Ā  Ā  Ā  Ā  Ā  Ā  "location"
Ā  Ā  Ā  Ā  Ā  ],
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "geoip": {
Ā  Ā  Ā  Ā  Ā  "field": "data.gcp.jsonPayload.sourceIP",
Ā  Ā  Ā  Ā  Ā  "target_field": "GeoLocation",
Ā  Ā  Ā  Ā  Ā  "properties": [
Ā  Ā  Ā  Ā  Ā  Ā  "city_name",
Ā  Ā  Ā  Ā  Ā  Ā  "country_name",
Ā  Ā  Ā  Ā  Ā  Ā  "region_name",
Ā  Ā  Ā  Ā  Ā  Ā  "location"
Ā  Ā  Ā  Ā  Ā  ],
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "geoip": {
Ā  Ā  Ā  Ā  Ā  "field": "data.office365.ClientIP",
Ā  Ā  Ā  Ā  Ā  "target_field": "GeoLocation",
Ā  Ā  Ā  Ā  Ā  "properties": [
Ā  Ā  Ā  Ā  Ā  Ā  "city_name",
Ā  Ā  Ā  Ā  Ā  Ā  "country_name",
Ā  Ā  Ā  Ā  Ā  Ā  "region_name",
Ā  Ā  Ā  Ā  Ā  Ā  "location"
Ā  Ā  Ā  Ā  Ā  ],
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "date": {
Ā  Ā  Ā  Ā  Ā  "field": "timestamp",
Ā  Ā  Ā  Ā  Ā  "target_field": "@timestamp",
Ā  Ā  Ā  Ā  Ā  "formats": [
Ā  Ā  Ā  Ā  Ā  Ā  "ISO8601"
Ā  Ā  Ā  Ā  Ā  ],
Ā  Ā  Ā  Ā  Ā  "ignore_failure": false
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "date_index_name": {
Ā  Ā  Ā  Ā  Ā  "field": "timestamp",
Ā  Ā  Ā  Ā  Ā  "date_rounding": "d",
Ā  Ā  Ā  Ā  Ā  "index_name_prefix": "{{fields.index_prefix}}",
Ā  Ā  Ā  Ā  Ā  "index_name_format": "yyyy.MM.dd",
Ā  Ā  Ā  Ā  Ā  "ignore_failure": false
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "date_index_name": {
Ā  Ā  Ā  Ā  Ā  "if": "ctx.location != null && (ctx.location == 'command_CPUUsage' || ctx.location == 'command_MEMUsage' || ctx.location == 'command_DiskFree' || ctx.location == 'command_NetworkTrafficIn' || ctx.location == 'command_NetworkTrafficOut')",
Ā  Ā  Ā  Ā  Ā  "field": "timestamp",
Ā  Ā  Ā  Ā  Ā  "date_rounding": "d",
Ā  Ā  Ā  Ā  Ā  "index_name_prefix": "my-performance-counter-1.x-",
Ā  Ā  Ā  Ā  Ā  "index_name_format": "yyyy.MM.dd"
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "date_index_name": {
Ā  Ā  Ā  Ā  Ā  "field": "timestamp",
Ā  Ā  Ā  Ā  Ā  "date_rounding": "d",
Ā  Ā  Ā  Ā  Ā  "index_name_prefix": "my-performance-counter-linux-1.x-",
Ā  Ā  Ā  Ā  Ā  "index_name_format": "yyyy.MM.dd",
Ā  Ā  Ā  Ā  Ā  "if": "ctx?.rule?.groups != null && ctx.rule.groups.contains('linux_performance_metric')"
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "message",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true,
Ā  Ā  Ā  Ā  Ā  "field": "ecs"
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "beat",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "input_type",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "tags",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "count",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "@version",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "log",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "offset",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true,
Ā  Ā  Ā  Ā  Ā  "field": "type",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "host",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "fields",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "event",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "fileset",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  },
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "remove": {
Ā  Ā  Ā  Ā  Ā  "field": "service",
Ā  Ā  Ā  Ā  Ā  "ignore_missing": true,
Ā  Ā  Ā  Ā  Ā  "ignore_failure": true
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  }
Ā  Ā  ],
Ā  Ā  "on_failure": [
Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  "drop": {}
Ā  Ā  Ā  }
Ā  Ā  ]
Ā  }
}


The logs from the filebeat log file that is in debug mode is( it has a alert from the linux event of performance metric) :Ā 

2026-01-07T13:45:19.554Z Ā  Ā  Ā  Ā DEBUG Ā  [processors] Ā  Ā processing/processors.go:203 Ā  Ā Publish event: {
Ā  "@timestamp": "2026-01-07T13:45:19.554Z",
Ā  "@metadata": {
Ā  Ā  "beat": "filebeat",
Ā  Ā  "type": "_doc",
Ā  Ā  "version": "7.10.2",
Ā  Ā  "pipeline": "filebeat-7.10.2-wazuh-alerts-pipeline"
Ā  },
Ā  "fileset": {
Ā  Ā  "name": "alerts"
Ā  },
Ā  "service": {
Ā  Ā  "type": "wazuh"
Ā  },
Ā  "ecs": {
Ā  Ā  "version": "1.6.0"
Ā  },
Ā  "host": {
Ā  Ā  "name": "wazuhsrv"
Ā  },
Ā  "agent": {
Ā  Ā  "ephemeral_id": "e9e37f1d-b0e4-4c67-8c15-4f444bc0f0e0",
Ā  Ā  "id": "04641ba4-08fc-4b64-b80f-05ef8b7c2667",
Ā  Ā  "name": "wazuhsrv",
Ā  Ā  "type": "filebeat",
Ā  Ā  "version": "7.10.2",
Ā  Ā  "hostname": "wazuhsrv"
Ā  },
Ā  "message": "{\"timestamp\":\"2026-01-07T13:45:15.305+0000\",\"rule\":{\"level\":3,\"description\":\"Disk metrics\",\"id\":\"310060\",\"firedtimes\":91,\"mail\":false,\"groups\":[\"linux_performance_metric\"]},\"agent\":{\"id\":\"005\",\"name\":\"oracleLinux\",\"ip\":\"172.22.165.142\",\"labels\":{\"group\":\"org1\"}},\"manager\":{\"name\":\"wazuhsrv\"},\"id\":\"1767793515.18635877\",\"full_log\":\"Jan Ā 7 15:41:09 DESKTOP-F2RL06M linux_disk_check: ossec: output: 'linux_disk_metrics':\\n1321447424 1024787374080\",\"predecoder\":{\"program_name\":\"linux_disk_check\",\"timestamp\":\"Jan Ā 7 15:41:09\",\"hostname\":\"DESKTOP-F2RL06M\"},\"decoder\":{\"parent\":\"linux_disk_check\",\"name\":\"linux_disk_check\"},\"data\":{\"disk_used_bytes\":\"1321447424\",\"disk_free_bytes\":\"1024787374080\"},\"location\":\"linux_disk_metrics\"}",
Ā  "event": {
Ā  Ā  "module": "wazuh",
Ā  Ā  "dataset": "wazuh.alerts"
Ā  },
Ā  "input": {
Ā  Ā  "type": "log"
Ā  },
Ā  "fields": {
Ā  Ā  "index_prefix": "wazuh-alerts-4.x-"
Ā  },
Ā  "log": {
Ā  Ā  "offset": 13832411,
Ā  Ā  "file": {
Ā  Ā  Ā  "path": "/var/ossec/logs/alerts/alerts.json"
Ā  Ā  }
Ā  }
}
2026-01-07T13:45:19.555Z Ā  Ā  Ā  Ā DEBUG Ā  [harvester] Ā  Ā  log/log.go:107 Ā End of file reached: /var/ossec/logs/alerts/alerts.json; Backoff now.
2026-01-07T13:45:20.555Z Ā  Ā  Ā  Ā DEBUG Ā  [harvester] Ā  Ā  log/log.go:107 Ā End of file reached: /var/ossec/logs/alerts/alerts.json; Backoff now.
2026-01-07T13:45:20.563Z Ā  Ā  Ā  Ā DEBUG Ā  [elasticsearch] elasticsearch/client.go:230 Ā  Ā  PublishEvents: 4 events have been published to elasticsearch in 9.801894ms.
2026-01-07T13:45:20.563Z Ā  Ā  Ā  Ā DEBUG Ā  [publisher] Ā  Ā  memqueue/ackloop.go:160 ackloop: receive ack [783: 0, 4]
2026-01-07T13:45:20.564Z Ā  Ā  Ā  Ā DEBUG Ā  [publisher] Ā  Ā  memqueue/eventloop.go:535 Ā  Ā  Ā  broker ACK events: count=4, start-seq=3285, end-seq=3288
2026-01-07T13:45:20.564Z Ā  Ā  Ā  Ā DEBUG Ā  [acker] beater/acker.go:59 Ā  Ā  Ā stateful ack Ā  Ā {"count": 4}
2026-01-07T13:45:20.564Z Ā  Ā  Ā  Ā DEBUG Ā  [publisher] Ā  Ā  memqueue/ackloop.go:128 ackloop: return ack to broker loop:4
2026-01-07T13:45:20.564Z Ā  Ā  Ā  Ā DEBUG Ā  [publisher] Ā  Ā  memqueue/ackloop.go:131 ackloop: Ā done send ack
2026-01-07T13:45:20.565Z Ā  Ā  Ā  Ā DEBUG Ā  [registrar] Ā  Ā  registrar/registrar.go:264 Ā  Ā  Ā Processing 4 events
2026-01-07T13:45:20.565Z Ā  Ā  Ā  Ā DEBUG Ā  [registrar] Ā  Ā  registrar/registrar.go:231 Ā  Ā  Ā Registrar state updates processed. Count: 4
2026-01-07T13:45:20.565Z Ā  Ā  Ā  Ā DEBUG Ā  [registrar] Ā  Ā  registrar/registrar.go:201 Ā  Ā  Ā Registry file updated. 1 active states.
2026-01-07T13:45:22.556Z Ā  Ā  Ā  Ā DEBUG Ā  [harvester] Ā  Ā  log/log.go:107 Ā End of file reached: /var/ossec/logs/alerts/alerts.json; Backoff now.
2026-01-07T13:45:25.211Z Ā  Ā  Ā  Ā DEBUG Ā  [input] input/input.go:139 Ā  Ā  Ā Run input
2026-01-07T13:45:25.212Z Ā  Ā  Ā  Ā DEBUG Ā  [input] log/input.go:205 Ā  Ā  Ā  Ā Start next scan
2026-01-07T13:45:25.212Z Ā  Ā  Ā  Ā DEBUG Ā  [input] log/input.go:439 Ā  Ā  Ā  Ā Check file for harvesting: /var/ossec/logs/alerts/alerts.json
2026-01-07T13:45:25.212Z Ā  Ā  Ā  Ā DEBUG Ā  [input] log/input.go:530 Ā  Ā  Ā  Ā Update existing file for harvesting: /var/ossec/logs/alerts/alerts.json, offset: 13833138
2026-01-07T13:45:25.213Z Ā  Ā  Ā  Ā DEBUG Ā  [input] log/input.go:582 Ā  Ā  Ā  Ā Harvester for file is still running: /var/ossec/logs/alerts/alerts.json
2026-01-07T13:45:25.213Z Ā  Ā  Ā  Ā DEBUG Ā  [input] log/input.go:226 Ā  Ā  Ā  Ā input states cleaned up. Before: 1, After: 1, Pending: 0
2026-01-07T13:45:26.557Z Ā  Ā  Ā  Ā DEBUG Ā  [harvester] Ā  Ā  log/log.go:107 Ā End of file reached: /var/ossec/logs/alerts/alerts.json; Backoff now.

Also from the windows agents log i dont see any errors from the command execution :
Command started related log entries
2026/01/07 15:43:26 wazuh-modulesd:command[15680] wm_command.c:153 at wm_command_main(): INFO: Starting command 'CPUUsage'.
2026/01/07 15:43:26 wazuh-agent[15680] wm_exec.c:147 at wm_exec(): DEBUG: UTF-8 command: Powershell -ExecutionPolicy Bypass -c "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; @{ winCounter = (Get-Counter '\Processor(_Total)\% Processor Time').CounterSamples[0] } | ConvertTo-Json -compress"
2026/01/07 15:43:26 wazuh-modulesd:command[15680] wm_command.c:153 at wm_command_main(): INFO: Starting command 'MEMUsage'.
2026/01/07 15:43:26 wazuh-agent[15680] wm_exec.c:147 at wm_exec(): DEBUG: UTF-8 command: Powershell -ExecutionPolicy Bypass -c "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; @{ winCounter = (Get-Counter '\Memory\Available MBytes').CounterSamples[0] } | ConvertTo-Json -compress"
Command Finished related log entries
2026/01/07 15:43:30 wazuh-modulesd:command[15680] wm_command.c:190 at wm_command_main(): DEBUG: Command 'CPUUsage' finished.
2026/01/07 15:43:30 wazuh-modulesd:command[15680] wm_command.c:140 at wm_command_main(): DEBUG: Sleeping until: 2026/01/07 15:43:56
2026/01/07 15:43:31 wazuh-modulesd:command[15680] wm_command.c:190 at wm_command_main(): DEBUG: Command 'MEMUsage' finished.
2026/01/07 15:43:31 wazuh-modulesd:command[15680] wm_command.c:140 at wm_command_main(): DEBUG: Sleeping until: 2026/01/07 15:43:5

I want to mention the the linux related alerts for the performance metric are being stored to their index and the data is being showned to the dashboard

Thank you in advance

George Xristop

unread,
Jan 7, 2026, 8:52:40 AMĀ (3 days ago)Ā Jan 7
to Wazuh | Mailing List
Replying because i forgot to question that. Given now that the data is only being written to the archives log file does that mean that the decoding/rule matching isnt being done properly?Ā 

Federico Gustavo Galland

unread,
Jan 7, 2026, 10:33:01 AMĀ (3 days ago)Ā Jan 7
to Wazuh | Mailing List
Hey Xristop,

I just tested the events from your archives.json along with the rules from the Wazuh Blog and they actually triggered rules in wazuh-logtest.

Can you share the output of the following command?

grep -R json /var/ossec/etc/decoders

There may be some custom decoder that's interfering with proper parsing of the json event.

Federico Gustavo Galland

unread,
Jan 7, 2026, 10:34:40 AMĀ (3 days ago)Ā Jan 7
to Wazuh | Mailing List
# cat archives.json
{"timestamp":"2026-01-07T12:57:06.092+0000","agent":{"id":"001","name":"DESKTOP-F2RL06M","ip":"192.168.2.80"},"manager":{"name":"wazuhsrv"},"id":"1767790626.17085798","full_log":"{\"winCounter\":{\"Path\":\"\\\\\\\\desktop-f2rl06m\\\\network interface(realtek pcie gbe family controller)\\\\bytes received/sec\",\"InstanceName\":\"realtek pcie gbe family controller\",\"CookedValue\":2520.202815281938,\"RawValue\":32264057835,\"SecondValue\":30233405182275,\"MultipleCount\":1,\"CounterType\":272696576,\"Timestamp\":\"\\/Date(1767790380487)\\/\",\"Timestamp100NSec\":134122711804870000,\"Status\":0,\"DefaultScale\":4294967292,\"TimeBase\":10000000}}\r","decoder":{"name":"json"},"location":"command_NetworkTrafficIn"}
{"timestamp":"2026-01-07T12:57:06.546+0000","agent":{"id":"001","name":"DESKTOP-F2RL06M","ip":"192.168.2.80"},"manager":{"name":"wazuhsrv"},"id":"1767790626.17085798","full_log":"{\"winCounter\":{\"Path\":\"\\\\\\\\desktop-f2rl06m\\\\network interface(realtek pcie gbe family controller)\\\\bytes sent/sec\",\"InstanceName\":\"realtek pcie gbe family controller\",\"CookedValue\":11169.445278284877,\"RawValue\":19452146606,\"SecondValue\":30233410038073,\"MultipleCount\":1,\"CounterType\":272696576,\"Timestamp\":\"\\/Date(1767790380972)\\/\",\"Timestamp100NSec\":134122711809720000,\"Status\":0,\"DefaultScale\":4294967292,\"TimeBase\":10000000}}\r","decoder":{"name":"json"},"location":"command_NetworkTrafficOut"}
{"timestamp":"2026-01-07T12:57:06.778+0000","agent":{"id":"001","name":"DESKTOP-F2RL06M","ip":"192.168.2.80"},"manager":{"name":"wazuhsrv"},"id":"1767790626.17085798","full_log":"{\"winCounter\":{\"Path\":\"\\\\\\\\desktop-f2rl06m\\\\logicaldisk(harddiskvolume1)\\\\free megabytes\",\"InstanceName\":\"harddiskvolume1\",\"CookedValue\":50,\"RawValue\":50,\"SecondValue\":0,\"MultipleCount\":1,\"CounterType\":65536,\"Timestamp\":\"\\/Date(1767790381204)\\/\",\"Timestamp100NSec\":134122711812040000,\"Status\":0,\"DefaultScale\":0,\"TimeBase\":10000000}}\r","decoder":{"name":"json"},"location":"command_DiskFree"}


# cat /root/xristop/archives.json | jq -c '.full_log | fromjson' | /var/ossec/bin/wazuh-logtest -v 2>&1 | grep -A8 'Phase 3'

**Phase 3: Completed filtering (rules).
id: '302004'
level: '3'
description: 'Windows Counter: Network Traffic In'
groups: '['WinCounter', 'NetworkTrafficIn']'
firedtimes: '1'
mail: 'False'
**Alert to be generated.

--

**Phase 3: Completed filtering (rules).
id: '302005'
level: '3'
description: 'Windows Counter: Network Traffic Out'
groups: '['WinCounter', 'NetworkTrafficOut']'
firedtimes: '1'
mail: 'False'
**Alert to be generated.

--

**Phase 3: Completed filtering (rules).
id: '302003'
level: '3'
description: 'Windows Counter: Disk Space Free'
groups: '['WinCounter', 'DiskFree']'
firedtimes: '1'
mail: 'False'
**Alert to be generated.

George Xristop

unread,
Jan 8, 2026, 4:55:15 AMĀ (yesterday)Ā Jan 8
to Wazuh | Mailing List
HelloĀ  again , apologies for the late delayĀ 

the output of the grep command :Ā 
/var/ossec/etc/decoders/zeek_decoders.xml: Ā <parent>json</parent>
/var/ossec/etc/decoders/zeek_decoders.xml: Ā <parent>json</parent>
/var/ossec/etc/decoders/zeek_decoders.xml: Ā <parent>json</parent>
/var/ossec/etc/decoders/zeek_decoders.xml: Ā <parent>json</parent>
/var/ossec/etc/decoders/zeek_decoders.xml: Ā <parent>json</parent>
/var/ossec/etc/decoders/zeek_decoders.xml: Ā <parent>json</parent>
/var/ossec/etc/decoders/zeek_decoders.xml: Ā <parent>json</parent>
/var/ossec/etc/decoders/zeek_decoders.xml: Ā <parent>json</parent>
/var/ossec/etc/decoders/zeek_decoders.xml: Ā <parent>json</parent>

Took the initiative and moved the zeek_decoders.xml to a /home directory and restarted the manager and everything now works.Ā 

But im curious on why did this happend , and if it will happen again with lets say another rule that matches a json alert?

Thank you so much for the helpĀ 

Federico Gustavo Galland

unread,
Jan 8, 2026, 5:57:32 AMĀ (yesterday)Ā Jan 8
to Wazuh | Mailing List
Hey George,

I've had an issue with the zeek decoder in the past. I fixed this using the attached alternative decoder for it.

Let me know if it helps.

Regards,
Fede
zeek.xml

George Xristop

unread,
Jan 8, 2026, 8:37:13 AMĀ (yesterday)Ā Jan 8
to Wazuh | Mailing List

Hello Federico ,Ā 
I used the zeek decoders you attached and everything works fine , so i think the problem is fixed.Ā 

I suppose the error was with the zeek decoding the json while the win counter rule was also decoding/filtering that ?Ā Ā 

Thank you very much for the support .Ā 

Federico Gustavo Galland

unread,
Jan 8, 2026, 8:54:52 AMĀ (yesterday)Ā Jan 8
to George Xristop, Wazuh | Mailing List
George,

I'm not 100% positive of the cause of the issue, but the json decoder is implemented in the C code of the tool, and inheriting from it in your own custom decoders tends to break it, impeding normal evaluation of rules that depend on it.

I'm glad you got it working.

Have a nice rest of the week!



--
You received this message because you are subscribed to a topic in the Google Groups "Wazuh | Mailing List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wazuh/-hBKgXRHqAs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wazuh+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wazuh/24333d02-af02-4a54-8bd2-491288ecffe9n%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages