Splunk Search

Timechart and overlay two columns?

snipedown21
Path Finder

I have a field outcomeIndicator in my data, that holds values 0,1,5,8.
0 and 1 mean a success of the event, and 5 and 8 mean failure.
Now, I want to use timechart count to plot these values over a month, for a span of 1 day, i.e the timechart must show the total events in a day resulting in success and failures, for the previous 30 days.
This timechart must strictly be graphical and must show the trend for both failures and successes over a month.
alt text

Here the green colored trend-line represents the success per day for a month and the red colored trend-line represents failures per day over a month. The image is just for representation and I want to know the possibilities of achieving this.
Thank you.
Cheers.
-Snipedown21

0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi snipedown21,
try something like this:

your_search
| eval result=if(outcomeIndicator<2,"Success","Failure")
| timechart count by result

To set the green and red colors use

<option name="charting.legend.labels">[Success,Failure]</option>
<option name="charting.seriesColors">[0x008000,0xFF0000]</option>

Bye.
Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi snipedown21,
try something like this:

your_search
| eval result=if(outcomeIndicator<2,"Success","Failure")
| timechart count by result

To set the green and red colors use

<option name="charting.legend.labels">[Success,Failure]</option>
<option name="charting.seriesColors">[0x008000,0xFF0000]</option>

Bye.
Giuseppe

0 Karma

snipedown21
Path Finder

Hi Giuseppe.
Dude!!! That was absolutely perfect. Even the color schemes I had put up in the sample were exactly what you gave me.
Thank you a lot.

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!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...