Dashboards & Visualizations

Colour in timechart

ARaman77
Explorer

I am trying to create a timechart of errors with but is not working 

index=xxx  AND source = xxxx AND (Error* OR Exception*) | timechart distinct_count(txnid) as errCount | eval RAG = case ( errCount > 200, “Red”,  errCount > 100 AND errCount <=200, “Amber” , 1==1,  “ Green”)

<option name=“charting.fieldcolors”>{“Red”: 0xD93F3C, “Amber”: 0xFF9933, “Green”: 0x009933}</option>

Labels (1)
Tags (1)
0 Karma

niketn
Legend

@ARaman77 just add the following two SPL pipes to your existing search. Current you have only one series with numerical data. So only one series color gets applied.

| eval {RAG}=errCount
| fields - RAG errCount

 

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

ARaman77
Explorer

Can you let me know how to use it

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You can assign different colours to different series in the chart. In your case, you only have one series errCount so you could set the colour of that rather than letting splunk pick a colour for you.

0 Karma

ARaman77
Explorer

I want the colour of errCount to change depending on whether is greater 200, 100 or Less than 100

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try 

<option name=“charting.fieldColors”>{“Red”: 0xD93F3C, “Amber”: 0xFF9933, “Green”: 0x009933}</option>
0 Karma

ARaman77
Explorer

Sorry its not working

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You haven't included RAG in your 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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...