Just got the splunk pdf guide, moved it to the iPad for some weekend reading, still trying to understand how | separates what, hopefully that will help but I will say it's so confusing, really need to grasp this as the requests from people are coming in all over. So, I have users hitting our site via an API. The API has 4 different tokens so I know which application was used (website, iphone, etc.). I would like to know in the past x time each person and the # of times they hit each one, for example;
username - website - iphone - android - website2
usera 0 2 0 5
Now, my query currently looks like this;
memberLevel="1" AND ApiKey = "123" OR ApiKey = "456" OR ApiKey = "789" OR ApiKey = "000" | top username limit="100" application
and the results look like this;
username - application - count - percentage
usera web2 2132 51.232132
application is a lookup to the apikey field so they see web2 instead of 000, but i am trying to basically count BY application and username. Any help on this is appreciated.
************************************************ Updated Comments due to limited reply size ********************************************************
the results is what's not working. The OP showed both what I wanted vs the output. The application has a unique API key by type. I would like to know each user and count each way he accesses the site. So I could get username Joe, then 3 logins by a website, 10 by an iphone. The query provided shows one field application with what I would guess was the last one as opposed to counting each one. I have a separate query that gives me what I want (broken out) but total by day, not by user but maybe the better example.
memberLevel="1" AND (ApiKey = "123" OR ApiKey = "456" OR ApiKey = "789" OR ApiKey = "000") | timechart span=1d count BY application. That output looks like;
_time -- web1 -- iphone -- android -- web2
date -- 1200 -- 800 -- 982 -- 430
I can look at that and say ok, most people came from web1. Now I want to remove the date, and just say for the last 7 day's, tell me the top users of the site, broken out;
username -- web1 -- iphone -- android -- web2
joe -- 200 -- 5 -- 0 -- 0
sam -- 110 -- 0 -- 5 -- 0
Does it make more sense when I explain it like that?
... View more