Splunk Search

Table ordered by OID occurrence count

splunk_zen
Builder

Hi,
what would be the SPL to return a table ordered by most common oid, server ?

2014-02-11 17:09:23,855 ERROR SNMP get returned empty value: SWITCH-UAT-07 1.3.6.1.4.1.9.9.117.1.1.2.1.3.104000023

2014-02-11 16:06:01,655 ERROR SNMP get returned empty value: server-prd-01 1.3.6.1.4.1.232.6.2.6.8.1.6.1.9

2014-02-11 14:48:26,846 ERROR SNMP get returned empty value: SWITCH-US1 1.3.6.1.2.1.31.1.1.1.11.5

Tags (2)
0 Karma
1 Solution

somesoni2
Revered Legend

Try this:

sourcetype=yoursourcetype | rex "(?i) value: (?P<server>[^ ]+) (?P<oid>.*)" | table _time, server, oid | stats count by server,oid | sort -count

View solution in original post

somesoni2
Revered Legend

Try this:

sourcetype=yoursourcetype | rex "(?i) value: (?P<server>[^ ]+) (?P<oid>.*)" | table _time, server, oid | stats count by server,oid | sort -count

splunk_zen
Builder

Simple and effective,
thanks !

0 Karma

lukejadamec
Super Champion

Which value is the oid?

Is the oid already extracted as a field?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...