Splunk Search

How can I search count by DN based on my sample event?

sid19920
New Member

How can I do search count by dn here? tag=101 means search. I have already used transaction conn to separate based on connection numberalt text

0 Karma

sundareshr
Legend

Try this instead of using transaction

*EDITED*

 your base search | eventstats values(dn) as dn by conn | where tag=101 | timechart count by dn usenull=f useother=f
0 Karma

sid19920
New Member

This is a preview of how the data is indexed initiallyalt text

0 Karma

sid19920
New Member

https://postimg.org/image/igb8y7ohv/. I couldn't as I don't have enough karma points. Can you see the link now?

0 Karma

sundareshr
Legend

yes. i see it now

0 Karma

sundareshr
Legend

I assume the events you shared are from a search like this your base search tag=101, right? Because I don't see dn= anywhere. Try the updated query I posted.

0 Karma

sid19920
New Member

the events i have posted are without any search. Just the raw file. When I do search for tag=101 all the dn fields disappear. I did get an output using the new query but the result is different from what I expected and its not a timechart

0 Karma

sid19920
New Member

The graphs should look like this. The first one is for Search count by DN and the second one is for Search count duration by DN. I need help with both pleasealt text

0 Karma

sundareshr
Legend

Try the edited query

0 Karma

sid19920
New Member

I did. It doesn't work. I think you'd be able to solve it if I can send you the log file

0 Karma

sundareshr
Legend

That'll be great. Share a few events

0 Karma

sid19920
New Member

alt text

Thnx.Ive added a link to the image url for you.

0 Karma

sundareshr
Legend

I don't see the link. All I see is alt text. Just paste a few events to your original question

0 Karma

sid19920
New Member

Thnx for the reply. Sorry but it says "No results". If i don't use transaction then the events are not grouped based on conn number. The DN value is only present after the binding is complete so I used transaction so that the dn and SRCH are grouped in same event.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...