Forum Discussion
VS total connections to SYSLOG
Hi All,
I'm fairly new to the world of F5 and in particular iRules so I was hoping for some advice. I need to capture the total number of connections to a particular Virtual Server every few seconds. I know the dashboard utility can display this data over the last 5 minutes, but I need to be able to retain this information historically. The server is an on-demand streaming service so the total connections can vary quite wildly and we need to know this information for scaling purposes.
SNMP traps don't seem to be the way forward for as short an interval as that, so from what I've read the best option is an iRule to write this information to a remote syslog. Does that seem like the way to go? And if so, does anyone have any advice on how to construct the iRule itself? I'm very new to that world!
Any other suggestions also greatly appreciated!
Thanks,
Chris
- Leonardo_Souza
Cirrocumulus
Yes, you can do with an iRule.
However, you could also use EM (not sure if BIGIQ is already doing this functionality). EM monitors and records multiple metrics about a BIGIP:
https://f5.com/products/big-iq-centralized-management
You could also just run a tmsh command at a regular interval using cron. After, just save the output to syslog (with logger). Some solutions to help with that:
For cron examples:
https://support.f5.com/csp/article/K13418
For logger:
https://support.f5.com/csp/article/K11127
An iRule for that is not difficult. You need to use clock command to check the time, and based in the documentation, the FLOWTABLE::count command should provide you the virtual server metric.
For clock command:
https://www.tcl.tk/man/tcl/TclCmd/clock.htm
For FLOWTABLE::count:
https://devcentral.f5.com/wiki/iRules.FLOWTABLE__count.ashx
Concluding, if you have EM (or BIGIP), I would go there first. After, I would prefer tmsh commands with cron. iRule would be my last option, as is more resource intensive as at least you have to calculate the time every new connection. Also, don't forget you need to have traffic all the time to trigger the iRule, otherwise nothing will be logged during quiet times.
Recent Discussions
Related Content
* 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