Splunk Search

Calculate percent of missing events

Cuyose
Builder

I swear I have done this before but I want to use the existence of events from a log file to calculate if the service writing them is up.

If I search over last 24 hours and there are events listed up until 12 hours ago, it would be 50% uptime. Problem is that the 12 hours when there are no logs are ignored and I cant remember how to count empty time buckets to make the calculation.

Now obviously I could use a latest if I only ever wanted to calculate things currently down, but I want to be able to sum all the time buckets where logs dont exist to the ones where they do.

0 Karma
1 Solution

Cuyose
Builder

I was able to finally figure out the right search to get what I needed. For any one coming across this, this solved my issue.

https://answers.splunk.com/answers/409513/how-to-edit-my-search-to-calculate-time-availabili.html

View solution in original post

0 Karma

Cuyose
Builder

I was able to finally figure out the right search to get what I needed. For any one coming across this, this solved my issue.

https://answers.splunk.com/answers/409513/how-to-edit-my-search-to-calculate-time-availabili.html

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

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 ...