Dashboards & Visualizations

Creating count by chart, but need additional field that only occurs once.

mikelanghorst
Motivator

I'm trying to create a search to populate a chart with event count by conn number, but also include the value from the extracted field dn, which only occurs once per conn number.

Example data:

[07/Feb/2012:11:30:52 -0800] conn=1021540 op=-1 msgId=-1 - fd=107 slot=107 LDAP connection from 172.21.73.13 to 172.21.64.40
[07/Feb/2012:11:30:52 -0800] conn=1021540 op=0 msgId=1 - BIND dn="uid=jbrown2,ou=people,o=domain,c=com" method=128 version=2
[07/Feb/2012:11:30:52 -0800] conn=1021540 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0 dn="uid=jbrown2,ou=people,o=domain,c=com"
[07/Feb/2012:11:30:52 -0800] conn=1021540 op=1 msgId=2 - SRCH base="ou=people,o=domain,c=com" scope=2 filter="(|(uid=Kathy*User*)(cn=Kathy*User*))" attrs=ALL
[07/Feb/2012:11:30:52 -0800] conn=1021540 op=1 msgId=2 - RESULT err=0 tag=101 nentries=1 etime=0
[07/Feb/2012:11:30:52 -0800] conn=1021540 op=2 msgId=3 - SRCH base="ou=groups,o=domain,c=com" scope=2 filter="(cn=Kathy*User*)" attrs="*"
[07/Feb/2012:11:30:52 -0800] conn=1021540 op=2 msgId=3 - RESULT err=0 tag=101 nentries=0 etime=0
[07/Feb/2012:11:30:52 -0800] conn=1021540 op=3 msgId=4 - SRCH base="cn=kathy User,ou=people,o=domain,c=com" scope=2 filter="(objectClass=*)" attrs=ALL
[07/Feb/2012:11:30:52 -0800] conn=1021540 op=3 msgId=4 - RESULT err=0 tag=101 nentries=1 etime=0
[07/Feb/2012:11:30:53 -0800] conn=1021540 op=4 msgId=5 - SRCH base="ou=groups,o=domain,c=com" scope=2 filter="(uniqueMember=cn=Kathy User, ou=People, o=domain, c=com)" attrs=ALL
[07/Feb/2012:11:30:53 -0800] conn=1021540 op=4 msgId=5 - RESULT err=0 tag=101 nentries=0 etime=0
[07/Feb/2012:11:30:53 -0800] conn=1021540 op=5 msgId=6 - UNBIND
[07/Feb/2012:11:30:53 -0800] conn=1021540 op=5 msgId=-1 - closing - U1
[07/Feb/2012:11:30:53 -0800] conn=1021540 op=-1 msgId=-1 - closed.

So, end results to be something like:
conn Count BIND dn


10035 305 uid=jbrown2,ou=people,o=domain,c=com
14842 5238 uid=my_app_account,ou=people,o=domain,c=com

Tags (1)
0 Karma
1 Solution

ayme
Splunk Employee
Splunk Employee

... | stats count, values(dn) by conn

View solution in original post

ayme
Splunk Employee
Splunk Employee

... | stats count, values(dn) by conn

mikelanghorst
Motivator

Thanks, now just need to fix or create a new field extraction since there's more dn= than I'd expected in the data.

0 Karma

sid19920
New Member

How can you calculate search count by dn above and create a time chart??

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...