Getting Data In

adding timespan brings no results

lancealotx
Explorer

I had a simple report showing the past 7 day's (by day) not per hour using the timechart span="86400s" function. The whole string looks like this;

memberLevel="x" AND ApiKey = "123" OR ApiKey = "456" OR ApiKey = "789" OR ApiKey = "123456 | timechart span="86400s" count

That gives a nice chart report by day. Now I want to chart each on the same chart, maybe a stacked one, so wrote this;

*memberLevel="x" AND ApiKey = "123" OR ApiKey = "456" OR ApiKey = "789" OR ApiKey = "123456 | timechart span="86400s" count | stats count BY ApiKey *

Now that 2nd one is what I want as it breaks out the counts by each ApiKey but it's back in an hourly chart. I tried adding the timechart span everywhere but get the error Error in 'stats' command: The argument 'span=86400s' is invalid. so not sure how to make that above chart to be what I want which would be a stacked chart broken by apikey.

I have removed my other 'basic' noob questions since I found the user guide and did the tutorials, and getting the hang, just stuck on this. I'm sure I can find, but if you can also say how to change the legend names as the current says just count.

Thanks.

Tags (1)
0 Karma
1 Solution

farleymike
Explorer

Try...

memberLevel="x" AND ApiKey = "123" OR ApiKey = "456" OR ApiKey = "789" OR ApiKey = "123456 | timechart span=1d count by ApiKey

View solution in original post

0 Karma

farleymike
Explorer

Try...

memberLevel="x" AND ApiKey = "123" OR ApiKey = "456" OR ApiKey = "789" OR ApiKey = "123456 | timechart span=1d count by ApiKey

0 Karma

lancealotx
Explorer

Thanks just got back, put that in and worked.

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...