Hi,
I am new to Splunk and working with parking records. I am calculating the current wait_time based off upcoming parking expiry times.
Within my monitored data each record has the following fields:
I have the steps I wish to use to display this, but am unsure how to construct a query to achieve the result.
Many thanks!
That's interesting if you don't have any way of prolonging the initial permit time and you don't validate the actual freeing of the permit. But hey, that's your business model 😉
But seriously.
1. The "where" seems ok but if you need one aggregate count, you don't do the "by parking_space". You just do "stats count".
2. Oh, no. You don't do declarative programming in SPL. Sometimes you can use foreach but very rarely. It's definitely not the case. The first where is mostly OK, but without the limit. But then you should simply sort it by permit_expiry and use top (or bottom) to get first or last 5 results.
3. What do you mean by "replace"?
4. Of which numbers?