Splunk Search

How can I Overlay chart with two fields?

indeed_2000
Motivator

Hi 

I have two fields: target (server1, server2,…) , status count by (ok,nokey)

how can i show these fields on timechart? (I mean overlay chart)


stack bar chart show count of status by target?

any idea?

 Thanks 

Labels (4)
Tags (4)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @indeed_2000,

please try this:

your_search
| bin span=1h _time
| stats count(eval(status="ok")) AS OK count(eval(status="nok")) AS NOK by target _time

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @indeed_2000,

please try this:

your_search
| bin span=1h _time
| stats count(eval(status="ok")) AS OK count(eval(status="nok")) AS NOK by target _time

Ciao.

Giuseppe

ITWhisperer
SplunkTrust
SplunkTrust
| timechart count by target

This should give you counts for each target against each time value.

When visualised, the timeline will be the x-axis, and you should have a line (for line chart) or column (for column chart) etc. for each series (target)

If you want, you can select one or more of these series as an overlay line on a column chart.

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!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...