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
Get Updates on the Splunk Community!

Splunk App for Anomaly Detection End of Life Announcement

Q: What is happening to the Splunk App for Anomaly Detection?A: Splunk is officially announcing the ...

Transforming Financial Data into Fraud Intelligence

Every day, banks and financial companies handle millions of transactions, logins, and customer interactions ...

How to send events & findings from AWS to Splunk using Amazon EventBridge

Amazon EventBridge is a serverless service that uses events to connect application components together, making ...