Splunk Search

How to edit my "stats (count)" search to display a table?

Abarny
Path Finder

Hi guys, i have a question about the function stats count (fields) by field | where xxx .

I want just the result of my stats count with an any number but i have a table with this function. Can you tell me how i can do for do that. Thanks.

| stats count(AA) by BB
| where BB!=200
alt text

0 Karma
1 Solution

Abarny
Path Finder

Thanks but I have an other question about the eval function. When i do that :

|bin span=1d _time
| stats count dc(_time) as days by date_wday
| eval Moyenne=(count)/(days)

I have a graphics with Moyenne count and days but if i want just display moyenne how i can remove count and days ?

Thanks for your answer.

View solution in original post

0 Karma

Abarny
Path Finder

Thanks but I have an other question about the eval function. When i do that :

|bin span=1d _time
| stats count dc(_time) as days by date_wday
| eval Moyenne=(count)/(days)

I have a graphics with Moyenne count and days but if i want just display moyenne how i can remove count and days ?

Thanks for your answer.

0 Karma

nickhills
Ultra Champion
|bin span=1d _time
| stats count dc(_time) as days by date_wday
| eval Moyenne=(count)/(days)
|table Moyenne
If my comment helps, please give it a thumbs up!

Abarny
Path Finder

It's okay i have founded. I need to say | table date_wday Moyenne.

Thanks you

0 Karma

adayton20
Contributor

You could just add |table count(AA) at the end of your search

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