Hi There
this is the Original message when they come into Graylog:
02.07.2021 14:47:30 1AC8 PACKET 00000297E33EA5A0 UDP Rcv 172.16.1.166 d21a Q [0001 D NOERROR] A (3)www(10)netzperten(2)de(0)
can I somehow extract the hostname without the numbers and brackets?
so I have a extra field like clean_hostname: www.netzperten.de
can a extractor extract (3)www(10)netzperten(2)de(0) and replaces the (0-9) with a dot?
thanks in advance
gsmith
(GSmith)
July 2, 2021, 10:45pm
2
Hello & Welcome
I came across this post and I knew it looked familiar like this post here
Hello everyone,
I have this example messages:
(3)www(10)easycoloso(3)com(0)*
(6)cmgrau(3)com(0)*
(12)settings-win(4)data(9)microsoft(3)com(0)*
(3)ens(4)rest(3)gti(6)mcafee(3)com(0)*
And I need a result like:
www.easycoloso.com
cmgrau.com
settings-win.data.microsoft.com
ens.rest.gti.mcafee.com
So I need to delete the first and last () with numbers inside but replace the () in the middle by dots. Any help?
Thanks in advance
Here are a couple more that may help you.
Hi,
i have a problem building my desired grok extractor. Following the docs I do:
Example Message:
<189>date=2021-06-22 time=10:21:36 devname=“HBG-FortiGate-4” devid=“FG4H0ETB20903009” eventtime=1624350097652764654 tz="+0200" logid=“0000000013” type=“traffic” subtype=“forward” level=“notice” vd=“CLIENT-VPN” srcip=10.64.0.7 srcport=42806 srcintf=“ssl.CLIENT-VPN” srcintfrole=“undefined” dstip=192.168.140.1 dstport=53 dstintf=“VLAN_296_C” dstintfrole=“lan” srccountry=“Reserved” dstcountry=“Reser…
Installed the reighnman “Windows DNS Content Pack” today. I’m using the “Sidecar method” because I had issues getting nxlog to play ball. It works well so far.
What doesn’t seem to be working though is the Extractor that replaces the parenthesized numbers with a period.
When I go to Inputs->Mange Extractors->Edit and click “Try”, it’s working. For example, (3)fun(3)net(0) is converted to .fun.net. (I could do without the leading and trailing dots, but that’s another day). It is set to “Cut…
Hi Graylog Team:
[ABX][lie][2021-05-22 10:51:20.277][xxx-thread-10][DEBUG][c.x.g.g.t.rfm.Rfm][275] - xxxx ]
my logs looks like this. And when I use “\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}” as regex expression in following java code, it could extract timestamp 2021-05-22 10:51:20.277
String logs="[GORAL][lieng][2021-05-22 10:51:20.277][xxx-thread-10][DEBUG][c.x.g.g.t.rfm.Rfm][275] - xxxx ]"
symbol = "";
Pattern pattern3 = Pattern.compile("\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2…
Hope this helps
1 Like
Thanks for your effort.
Besides the shared posts, I used the YouTube videos of “Bits Byte Hard” to lay out the rules and patterns and finally got it down.
1 Like
system
(system)
Closed
July 19, 2021, 9:23pm
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.