Splunk Search

If I use more than 6 times append command in query the Chart command shows incorrect result

nivethainspire_
Explorer

I ran the below query,

index=s sourcetype=S_1
| search Gene="dow" OR Gene="x" OR Gene="ari" OR Gene="lia" OR Gene="SX" OR Gene=z
| append [search index=s sourcetype="S_2"|fillnull |eval Gene="rage"] 
| append [search index=s sourcetype=S_3 |fillnull|eval Gene="ork"]
| append [search index=s sourcetype=S_4|fillnull|eval Gene="tat"]
| append [search index=s sourcetype=S_5 | fillnull |eval Gene="bas"]
| append [search index=s sourcetype=S_6 | fillnull |eval Gene="bas1"]
| append [search index=s sourcetype=S_7|fillnull value=""|eval Gene="App"|fields *]
|rename Gene as General 
| stats count by General,"Report"
|eventstats sum(*) as sum_* by General 
|foreach * [eval "Status %"=round((count/sum_count)*100,2)]|rename count as Count
|fields - sum_count
|chart values("Status %") over "Report" by General
|sort "Report" desc

I expect the below Result,

nivethainspire__0-1603891465655.png

But I get the below result, where "bas1" and "App" shows together as "OTHER"

nivethainspire__1-1603892149780.png

And it happens after I use the chart command.

Anyone can help me out.

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

isoutamo
SplunkTrust
SplunkTrust
useother=f just drop that OTHER column away. If you want to see it, then you should add limit=0 (to see all) or limit=20 (to see 20 values).

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

It's not the number of appends, it's the number of fields.  By default, the chart command displays 10 fields and puts the rest into "other".  To change that, use "| chart useother=f ...".

---
If this reply helps you, Karma would be appreciated.
0 Karma

nivethainspire_
Explorer

@richgalloway  Still I face the same issue.

0 Karma

isoutamo
SplunkTrust
SplunkTrust
useother=f just drop that OTHER column away. If you want to see it, then you should add limit=0 (to see all) or limit=20 (to see 20 values).

isoutamo
SplunkTrust
SplunkTrust
Hi
this is due to chart's limit which is 10 by default. You could change it by adding chart limit=XX (or limit=0 to unlimited it).
Anyhow you probably should tune your search to use eg. stat and not append? There are good presentation in conf how to do it.
https://conf.splunk.com/files/2020/slides/TRU1761C.pdf
r. Ismo
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...