Splunk Search

Find duration on transaction where field name doesn't match

pkcbailey
New Member

Sample data:

May 25 01:51:14 ns1 named[32063]: zone somezone.net/IN/default: notify from 192.168.10.20#31830: serial 558310538
May 25 03:16:17 ns1 named[32063]: zone somezone.net/IN/default: transferred serial 558310538: TSIG 'view12345'

My issue is, without using the serial number which I've not been able to map to the same field name, the data won't be tracked correctly in a transaction. I get transactions with serial number that don't match. I need to know how long it took the DNS to notify then transfer somezone.net for the same exact serial number.

0 Karma

pkcbailey
New Member

Here was the query I started with: index=dns host=ns1 ((notify AND serial) OR serial) somezone.net |transaction zonename startswith=notify endswith=transferred |where duration>600 |table duration

0 Karma

jodyfsu
Path Finder

Before we address the transaction, you say, "without using the serial number which I've not been able to map to the same field name,"...

Will a rex not work to get you the serial number, then you could use the serial number for the transaction?

0 Karma

pkcbailey
New Member

I'm not sure how to rex that into a single value.

0 Karma

jodyfsu
Path Finder

Does this work:

|rex "serial\s(?<SERIALNUMB>\d+)"
0 Karma

pkcbailey
New Member

None of the rex code folks have provided group the transaction with the same serial number yet.

0 Karma

aromanauskas
Path Finder

Try this:

index=dns host=ns1 ((notify AND serial) OR serial) somezone.net |rex "\s+serial\s+(?<serial_test>\d+)" | transaction serial_test,zonename max_events=2  startswith=notify endswith=transferred| where duration>600 |table duration
0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...