</decoder>
<decoder name="uvm_01">
<parent>uvm</parent>
<regex>"hostname":"d+.\d+.\d+.\d+"</regex>
<order>hostname</order>
</decoder>
The output from logtest is:
Starting
wazuh-logtest v4.5.0
Type one log per line
2023 Aug 25 14:11:17 INFO->10.50.0.8 Aug 25 14:11:17 INFO uvm[0]:
{"timeStamp":"2023-08-25 14:11:17.269","s2pBytes":0,"p2sBytes":0,"sessionId":110942518647497,"endTime":1692987077269,"class":"class
com.untangle.uvm.app.SessionStatsEvent","sessionEvent":{"entitled":true,"protocol":6,"hostname":"10.50.10.66","CServerPort":445,"protocolName":"TCP","localAddr":"10.50.10.66","SServerAddr":"10.50.4.235","serverIntf":1,"remoteAddr":"10.50.4.235","CClientAddr":"10.50.10.66","serverCountry":"XU","sessionId":110942518647497,"SClientAddr":"10.50.0.8","clientCountry":"XL","policyRuleId":0,"CClientPort":55464,"timeStamp":"2023-08-25
14:10:47.239","clientIntf":100,"policyId":1,"SClientPort":21875,"bypassed":false,"SServerPort":445,"CServerAddr":"10.50.4.235","tagsString":""},"c2pBytes":0,"p2cBytes":0}
**Phase 1: Completed pre-decoding.
full event: '2023 Aug 25 14:11:17 INFO->10.50.0.8 Aug 25 14:11:17 INFO
uvm[0]: {"timeStamp":"2023-08-25
14:11:17.269","s2pBytes":0,"p2sBytes":0,"sessionId":110942518647497,"endTime":1692987077269,"class":"class
com.untangle.uvm.app.SessionStatsEvent","sessionEvent":{"entitled":true,"protocol":6,"hostname":"10.50.10.66","CServerPort":445,"protocolName":"TCP","localAddr":"10.50.10.66","SServerAddr":"10.50.4.235","serverIntf":1,"remoteAddr":"10.50.4.235","CClientAddr":"10.50.10.66","serverCountry":"XU","sessionId":110942518647497,"SClientAddr":"10.50.0.8","clientCountry":"XL","policyRuleId":0,"CClientPort":55464,"timeStamp":"2023-08-25
14:10:47.239","clientIntf":100,"policyId":1,"SClientPort":21875,"bypassed":false,"SServerPort":445,"CServerAddr":"10.50.4.235","tagsString":""},"c2pBytes":0,"p2cBytes":0}'
timestamp: '2023 Aug 25 14:11:17'
**Phase 2: Completed decoding.
name: 'uvm'
**Phase 3: Completed filtering (rules).
id: '100010'
level: '10'
description: 'Raw JSON event'
groups: '['custom_rules_uvm']'
firedtimes: '1'
mail: 'False'
**Alert to be generated.
If I can get some help on how to get hostname working, I can work on others.
Thank you in advance.
<decoder name="uvm">
<program_name>uvm-to-192.168.0.80 </program_name>
</decoder>
<decoder name="uvm2">
<parent>uvm</parent>
<plugin_decoder offset="after_parent">JSON_Decoder</plugin_decoder>
</decoder>
<decoder name="uvm2">
<parent>uvm</parent>
<regex>"localAddr":"(\S+)"</regex>
<order>scrip</order>
</decoder>
<decoder name="uvm2">
<parent>uvm</parent>
<regex>"remoteAddr":"(\S+)"</regex>
<order>dstip</order>
</decoder>
my incoming message is this:
Dec 28 22:30:15 INFO uvm-to-192.168.0.80 {"timeStamp":"2024-12-28 22:30:15.22","s2pBytes":0,"p2sBytes":0,"endTime":1735443015220,"sessionId":113513477894668,"class":"class com.untangle.uvm.app.SessionStatsEvent","sessionEvent":{"entitled":true,"protocol":6,"hostname":"wlan0","CServerPort":8886,"protocolName":"TCP","serverLatitude":45.8491,"localAddr":"192.168.0.87","SServerAddr":"34.210.19.179","remoteAddr":"34.210.19.179","serverIntf":1,"CClientAddr":"192.168.0.87","serverCountry":"US","sessionId":113513477894668,"SClientAddr":"216.8.131.69","clientCountry":"XL","policyRuleId":0,"CClientPort":40016,"timeStamp":"2024-12-28 22:30:15.219","serverLongitude":-119.7143,"clientIntf":2,"policyId":1,"SClientPort":40016,"bypassed":false,"SServerPort":8886,"CServerAddr":"34.210.19.179","tagsString":""},"c2pBytes":0,"p2cBytes":0}
logtest shows it is not being decoded at all. Can you please point to me where I am not doing right?
Thank you.
--
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/uTQBgg87mok/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/c6e58318-0f15-4f3a-9c25-8f39f1f281a0n%40googlegroups.com.