I am looking for a way to only catch specific issues that occur after a certain threshold, over a given time frame.
e.g.
How can I accomplish this using Perl, ideally with something like log4Perl?
Thank you!
I think the answer would be 'use a hash'.
Define a hash in your app. Every time a bad request came in, extract the unique key, increment the hash value for that key. Once the value hits a threshold, spit out a warning. (And then reset it).
If you need cross-session persistence, you could probably use something like Storable
to load and save the 'invalid requests' table.