Splunk Search

Multiple fields in one chart

pudanelilita
Explorer

Hi,
I struggling to create chart, which will be with multiple field values (max,avg and min pauses) + need to see months (January, February, March etc.) in X-Axis

What I need to change here?
| eval fields=split(_raw," ")
| eval pauses=mvindex(fields,8)
| eventstats max(pauses) as Max_pause
| eventstats avg(pauses) as Avg_pause
| eventstats min(pauses) as Min_pause
| table Max_pause Avg_pause Min_pause

Tags (2)
0 Karma
1 Solution

whrg
Motivator

It would be helpful if you could post some sample data. Does your data have the _time field?

If you want a chart with time as the X-axis, then take a look at timechart.

Try something like this:

... | eval fields=split(_raw," ") | eval pauses=mvindex(fields,8) | timechart span=1mon max(pauses) as Max_pause avg(pauses) as Avg_pause min(pauses) as Min_pause

View solution in original post

0 Karma

whrg
Motivator

It would be helpful if you could post some sample data. Does your data have the _time field?

If you want a chart with time as the X-axis, then take a look at timechart.

Try something like this:

... | eval fields=split(_raw," ") | eval pauses=mvindex(fields,8) | timechart span=1mon max(pauses) as Max_pause avg(pauses) as Avg_pause min(pauses) as Min_pause
0 Karma

pudanelilita
Explorer

It worked without span=1mon, thanks!

0 Karma
Get Updates on the Splunk Community!

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...