Splunk Search

Help with time chart search that accumulates total count over 6 months

mayank101
New Member

I have a search that accumulates the total count for host over a 6 period of months.
Now when I am trying to draw a time chart for it, I am unable to do so.
It shows the result incorrectly- if it is showing one.
Could anyone help in correcting it?

|savedsearch "r1"
| bin _time span=6mon
|top 10 host by event,_time     | sort-count  | eventstats sum(count) as TotalNumber| eval PercentOfTotal = round(100 * count / TotalNumber,2). "%"
| stats  list(entity) as "Entity" list(count) as "Count", sum(count) as "Total"  by host ,_time
| sort-Total  
| addinfo 
| eval rank=1 | accum rank   | sort +num(rank)  | head (rank <=10)   | fields rank, host,Count,Total | eval Entity=mvindex(Entity,0,9) 
| eval Count=mvindex(Count,0,9) | eval Percent=mvindex(Percent,0,9)  | timechart span=1d useother=f count by host
0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...