Forum Discussion
clazba
Jan 30, 2011Nimbostratus
table command, how to log a timeout
Hi,
I would like to be able to log when a connection has timed out and thus dropped off the table in a rate limiting irule.
As far as I can tell there is no specific event triggered when a subtable entry has timed out (i.e. removed from the subtable because the timeout value has expired).
Consequently, I cant see a way of doing this without looping through the subtable and checking the timeout value of each key with 'table timeout - remaining'.
I see this as an 'ugly' way of doing it and very CPU expensive when the subtable contains thousands of entries.
Is there a better way of doing this ??
Thanks,
Claud
- hoolioCirrostratusHey Claud,
- clazbaNimbostratusHey Aaron,
- spark_86682Historic F5 AccountAaron is right; there's no way to get a block of code to run when a table entry expires. Originally, we had planned for an iRule event that would fire whenever any entry expired, but there were some daunting technical problems with that. The eventual solution will very likely look closer to (one of the forms of) the after command, in that for a given entry you'll be able to specify a block of code that will get executed when the entry goes away. That said, please do raise the issue with support, give them your specific use case, and ask for it to be added to ID 348949.
- clazbaNimbostratusThanks for expanding on this Spark and thanks for the ID, that's most useful.
- spark_86682Historic F5 AccountWell, if all you want to do is eventually notice that an entry expired, especially if expiration is a rare event, then I think you can just use two counters: one for when you add an entry, and one for when you explicitly delete one. The difference between them minus the current number of entries is how many entries expired on their own.
- clazbaNimbostratusThanks, I had thought of that but that would just tell us how many entries have expired and not which ones specifically. It would be useful to know which entry has timed out on its own (or it's about to time out) so to return its value (TCP socket for example) for forensic purpose.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects