Splunk Search

Timechart for unique login ids

freephoneid
Path Finder

I've following data in my summary index by time which runs in time range -1d@d to @d every day @ midnight:

09-01-11: userid=1, userid=2, userid=5
09-02-11: userid=2, userid=7, userid=11
09-03-11: userid=1, userid=9, userid=2, userid=33
09-04-11: userid=15, userid=1, userid=11, userid=33
09-05-11: userid=2, userid=9, uesrid=11
09-06-11: userid=50

In above case, I want to show the time chart as shown below:

09-01-11: count=3
09-02-11: count=2 (Since userid=2 is already counted earlier)
09-03-11: count=2 (Since userid=1 & userid=2 is already counted earlier)
09-04-11: count=1 (since userid=1, userid=11, userid=33 are already counted earlier)
09-05-11: count=0 (since userid=2, userid=9, uesrid=11 are already counted earlier)
09-06-11: count=1

How can I display timechart which will show unique userid count over time?

Thanks

Tags (2)
0 Karma

freephoneid
Path Finder

Hello Experts,

I'm sure this can be done in Splunk but still trying to figure out how to do calculations with time chart...

Please note that the userid=12 are different log lines. So, in my summary index, they're actually represented as shown below:

09-01-11: userid=1
          userid=2
          userid=5
09-02-11: userid=2
          userid=7
          userid=11
09-03-11: userid=1
          userid=9
          userid=2
          userid=33

Basically, I've simply added these log lines containing userid key/value pair in the summary index for each day.

I'll appreciate if you can post the splunk query to display the timechart.

Thanks!

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...