Dashboards & Visualizations

problem with pie chart

prapanna
Explorer

hi
i hav read the docs of Splunk but still unable to solve my problem..i want to create a pie chart where there are 5 sector.4 of them are for different url(that will be chosen by me) and the other sector will consist of rest of the urls. and the name of this sector will be OTHER.. what will be the searching code?
thanx..

Tags (1)
0 Karma

prapanna
Explorer

thnx for the answer.. but still there is a problem with it..here only the "other" part is showing in the chart.rest

of the sectors are not showing..

0 Karma

asimagu
Builder

before charting you could do create a new field based on a eval, if it's one of the four url's it will have the url name , if that is not the case the value will be "other"

eval my_url=case(url==url1,"url1",url==url2,"url2",url==url3,"url3",url==url4,"url4",url!="url1" AND url!=url2 AND url!=url3 AND url!=url4,"other") | chart count by my_url
0 Karma

asimagu
Builder

did that one work?

0 Karma

asimagu
Builder

sorry, I just edited my answer, that should work now

0 Karma

prapanna
Explorer

thnx for the answer.. but still there is a problem with it..here only the "other" part is showing in the chart.rest

of the sectors are not showing..

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...