Splunk Search

How to calculate the number of times the same event has occured in an index?

MG
Engager

How to calculate the number of times the same event has occured in an index

Labels (1)
0 Karma

GaetanVP
Contributor

Hello MG, 

As far as I know, you will never have the exact same event inside an index since each event has been indexed at a specific time.

You can easily count the number of "similar" event based on keys and values to compare, which can lead you to what you call "same event".

For instance if the same user visited the same page during the last hour, we could consider that those two events are similar, and you can count those within a Splunk search over the last our, something like :

index="myindex" user="user1" url="mywebsite/mypage"


Note that this search really depend on the sourcetype of the logs you're looking for of course...

I hope it helps!
Regards,

GaetanVP




0 Karma

MG
Engager

You are right..Another query I have is..

Calculating the size of an index and triggering the alert. If an alert triggered for one index then it should not trigger the same alert  for next  2hour . But it should trigger alert for other indexes.

 

Tags (1)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...