I'd like to build an alert that essentially says "if the count from this hour is more than twice, or less than half, the count from the last hour, throw an alert." I'm new to Splunk, and I'm having a hard time figuring out how to write this. Obviously I've got the count part—using stats count or timechart count or whatever. That gives me a relatively compact table, with a double-digit number of rows. Now I essentially want to join that table to itself. If this were SQL, I would find it trivial; it'd be a quick self-join. I can't figure out how to encode it in Splunk. Is there an easy way to do this?
timewrap looked promising, but I couldn't figure out how to take just this hour's count and divide by just the last hour's count. Instead timewrap gave me a bunch of columns, including an hour ago but also many other hours ago.
Does this problem have an obvious answer?
... View more