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 (1)
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!

Celebrating Fast Lane: 2025 Authorized Learning Partner of the Year

At .conf25, Splunk proudly recognized Fast Lane as the 2025 Authorized Learning Partner of the Year. This ...

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...