Hi All, Need a help in regex for doing the host over ride with dvc_host field value from the interesting fields for a firewall based on the sourcetype.
1) For the first source type paloalto:network:traffic, I am getting the below events details
index=firewall sourcetype="paloalto:network:traffic"
Event details:
Feb 15 10:21:12 test01pano.xxxxxx.com 1,2018/02/15 10:21:12,012501001041,TRAFFIC,end,1,2018/02/15 10:21:11,10.x.x.x,10.x.x.x,0.0.0.0,0.0.0.0,Foundation Services,,,dns,vsys2,Data-Center-Admin,Data-Center-Core,ae5.2005,ae5.250,pan_log_forward,2018/02/15 10:21:11,667736,1,50811,53,0,0,0x19,udp,allow,xxx,xx,1xx,2,2018/02/15 10:20:42,0,any,0,6477528057945424450,0x8000000000000000,10.0.0.0-10.x.x.x,10.0.0.0-10.x.x.x,0,1,1,aged-out,17,0,0,0,Data_Center,east01fw,from-policy,,,0,,0,,N/A
Requirement:
We want to overwrite the "host" field for firewall logs to use to value for the "dvc_host" field
host=test01pano.xxxxxx.com should be replaced with the dvc_host value=deast01fw
I had tried this query but it is throwing Error:
index=firewall sourcetype="paloalto:network:traffic" | rex field=_raw (?<host>\b[^(\.),]+\b(,)+\b(?=from-policy)\b) | table host dvc_host
Error in 'SearchParser': Missing a search command before '^'. Error at position '89' of search query 'search index=firewall sourcetype="paloalto:networ...{snipped} {errorcontext = ?<host>\b[^(\.),]+\b(}'.
But the regex is working fine when tested in the regex101.com , not sure where is the problem.
2) For the second sourcetype paloalto:network:sys, I am getting the below events:
Event Details:
Feb 15 10:45:14 test01pano.xxxxx.com 1,2018/02/15 10:45:14,000702503748,SYSTEM,general,0,2018/02/15 10:45:14,,general,,0,0,general,informational,"Connection to Update server: updates.paloaltonetworks.com completed successfully, initiated by 10.x.x.x",139387,0x0,0,0,0,0,,east01pano
Requirement:
We want overwrite the "host" field for logs to use to value for the "dvc_host" field.
host=test01pano.xxxxxx.com should be replaced with the dvc_host value=east01pano
Kindly guide me in creating the a regex which can over ride the host value to the value of dvc_host field.
... View more