Reporting

detect repeating values over time

stephen123
Path Finder

Hi - I want to detect IP's which continually appear in the logs over a 24 hour period
They must appear at least once every hour over the 24 hours to be included in the results.

Thanks

Tags (1)
0 Karma
1 Solution

kristian_kolb
Ultra Champion

Assuming that you have the IP address in a field called ip, this is one of the ways to achieve this.

sourcetype=blah earliest=-1d | stats dc(date_hour) as hrs by ip | search hrs=24

Hope this helps,

Kristian

View solution in original post

stephen123
Path Finder

thanks - works perfect

0 Karma

kristian_kolb
Ultra Champion

Assuming that you have the IP address in a field called ip, this is one of the ways to achieve this.

sourcetype=blah earliest=-1d | stats dc(date_hour) as hrs by ip | search hrs=24

Hope this helps,

Kristian

jtrucks
Splunk Employee
Splunk Employee

Mark it as correctly answered!

--
Jesse Trucks
Minister of Magic
0 Karma

stephen123
Path Finder

Thanks - works perfect

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...