Splunk Search

How to build a chart on unique field

wish2hate
New Member

I am trying to achieve building multiple area graph on one chart where my input is:

foo=blue
foo=purple
foo=red
foo=red
foo=red
foo=purple

And when I do splunk search, I would expect my search to be:

{get all logs} | top limit=0 "foo" | fields "foo" count

Where I would produce the following results:

red:       3
purple:  2
blue:      1

Now what I am seeking to get this type of count by time with all 3 different fields in ONE area graph.
Can someone please show me how to do this?

0 Karma

kiamco
Path Finder

you might want to just use a
|timechart

like

...base search
|timechart count(foo) by foo
0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...