Splunk Search

total similar events

Michael_Schyma1
Contributor

I am having problems trying to keep a sum of similar events in a field called 'count.' This field should group events with the same 'err_transcation_id.' I usually just use the top function for this, but i can for this search because the some fields should be left intentially blank and when i use that command it only grabs the fields that have everything.

Here is my search:

index=mainframeapps sourcetype="MainframeApps" NOT (Hosted="A390" OR "CPUC" OR "SYSE" OR "CPUE" OR "IPO1" OR "CPUB" OR "CPUA") NOT PENV*| table count, Hosted, err_job_name, err_id, environment, app_defined_key2, app_id, err_transaction_id, msg, err_call_chain |rename msg AS "Record Info" err_call_chain AS "Call Chain" Hosted AS "Hostname" environment AS "Service ID" err_transaction_id AS "Error Transaction ID" err_id AS "Error ID" app_id AS "Application ID" count AS "Count" percent AS "Percent" err_job_name AS "Error Job Name"| rex mode=sed field="Hosted" "s/\'//g"   | rex mode=sed field="Error Job Name" "s/\'//g"   | rex mode=sed field="Error ID" "s/\'//g"   | rex mode=sed field="Service ID" "s/\'//g"  | rex mode=sed field="Application ID" "s/\'//g"   | rex mode=sed field="Error Transaction ID" "s/\'//g" | rex mode=sed field="Record Info" "s/\'//g"   | rex mode=sed field="Call Chain" "s/\'//g"

This should be a pretty easy for some of you, but i am not having much luck with the stats command. Thank you guys so much.

Tags (1)
0 Karma

dart
Splunk Employee
Splunk Employee

I'd suggest you keep using the stats or top as before, but fill in the blanks with the fillnull command.

0 Karma

jonuwz
Influencer

what stats command are you trying to run? or what output are you trying to get ?

0 Karma

Michael_Schyma1
Contributor

If anymore information is needed, please just reachout. THX

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 ...