Splunk Search

How to generate a search that

svemurilv
Path Finder

I am looking for Unique users on my Splunk search head cluster
like :

like compare the users change percentage with previous month.

earliest=-60d@d latest=@d index=_audit  NOT user=splunk-system-user NOT user=admin| timechart span=30d dc(user)

thanks advance.

0 Karma
1 Solution

DalJeanis
Legend

Here's one way...

earliest=-6mon@mon latest=@mon index=_audit 
NOT user=splunk-system-user NOT user=admin
| bin _time span=1mon 
| stats dc(user) as UserCount by _time
| streamstats current=f last(UserCount) as PrevCount
| eval PctIncrease= if(isnull(PrevCount),"100%", tostring(floor(100*(UserCount-PrevCount)/PrevCount))."%")

View solution in original post

DalJeanis
Legend

Here's one way...

earliest=-6mon@mon latest=@mon index=_audit 
NOT user=splunk-system-user NOT user=admin
| bin _time span=1mon 
| stats dc(user) as UserCount by _time
| streamstats current=f last(UserCount) as PrevCount
| eval PctIncrease= if(isnull(PrevCount),"100%", tostring(floor(100*(UserCount-PrevCount)/PrevCount))."%")
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...