Splunk Search

Adding and average into a simple Dashboard. I assume this is difficult.

Jgreiner
Engager
index=mainframe

sourcetype=BMC:DEFENDER:RACF:bryslog

host=s0900d OR host=s0700d 


| timechart limit=50 count(event) BY host
| addcoltotals

I am looking add the AVG from each 1 week total for each day 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You could try something like this

| appendpipe
    [| stats avg(*) as average_*]
| addcoltotals 
| foreach average_*
    [| eval <<MATCHSEG1>>=if(isnull(<<MATCHSEG1>>),<<FIELD>>,<<MATCHSEG1>>)]
| fields - average_*

Jgreiner
Engager

That is amazing, Thank you.  I am new to the Splunk world as you can see.  How about a field next to each host that calculating the %of the total average per count?

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It isn't clear what you mean here, % of the total average? Do you mean the percentage of the total for that host that the count represents, or the percentage of the grand total for that host? Since you have also used timechart, I guess you could also mean the percentage of the total for the time bin that the count for the host represents.

It is probably best if you work out what it is that you are trying to show in your table/chart to clarify what the required calculation is.

0 Karma

Jgreiner
Engager

This is what i am looking for: well maybe
Date                                  S0100D                    S0400D
Friday 2024-04-11    4880961 (75%)     5247555 (35%)

 

AVG                                     34509759             4750349554

 

If that makes sense

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Not really,  4880961 (75%) means what?  4880961 isn't 75% of any of your other figures.

0 Karma

Jgreiner
Engager

these were dummy numbers, apologies.  percent change of the average

This is what i am looking for:
Date                                       S0100D                    S0400D
Friday       2024-04-11    200 (50%)               250 (25%)

Saturday 2024-04-11    600 (50%)               1750  (75%)

AVG                                        400                             1000

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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...