Splunk Search

How to get results for individual fields per second

angersleek
Path Finder

I have the following query which gives me per second average results for the events.
Is there a way I can modify it to produce the individual average results for each CLIENT? Thanks.

index=some_some2_idx ns=something app_name=my-api 
CLIENT IN (Apple, Orange, Banan) API IN (R_GET, T_GET) 
| timechart span=1s count as requests_per_second | stats avg(requests_per_second)

This is currently outputting:

avg(requests_per_second)
18.39494

I looking to get results as follows:

Apple     Orange     Banana
5.1       5.9        7.39
Tags (1)
0 Karma

randy_moore
Path Finder

Add a BY CLIENT at the end of the time chart and stats line

0 Karma

angersleek
Path Finder

Tried following and no results:

index=some_some2_idx ns=something app_name=my-api
CLIENT IN (A, B, C) API IN (R_GET, T_GET) 
| timechart span=1s count as requests_per_second by CLIENT | stats avg(requests_per_second) by CLIENT

Also tried By Client only at one spot as above for both places and same results.

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