We had issues at work today and we suspected one of the iRules was causing it by hogging too much CPU. Looked at the iRule stats at the command line since the Web UI was down and thought that it was hard to get an overview.

So I wrote a simple web app which parses output from the tmsh -c 'cd /;show ltm rule recursive' command. It basically takes this:

ltm rule-event Common/_sys_APM_ExchangeSupport_OA_BasicAuth:ACCESS_ACL_ALLOWED {
    aborts 0
    avg-cycles 0
    event-type ACCESS_ACL_ALLOWED
    failures 0
    max-cycles 0
    min-cycles 0
    name Common/_sys_APM_ExchangeSupport_OA_BasicAuth
    priority 500
    total-executions 0
}
ltm rule-event Common/_sys_APM_ExchangeSupport_OA_BasicAuth:ACCESS_POLICY_COMPLETED {
    aborts 0
    avg-cycles 0
    event-type ACCESS_POLICY_COMPLETED
    failures 0
    max-cycles 0
    min-cycles 0
    name Common/_sys_APM_ExchangeSupport_OA_BasicAuth
    priority 500
    total-executions 0
}

And renders this:

Hopefully it helps someone else too. The tool is available here https://loadbalancing.se/f5-stats and the code can be seen here https://github.com/net-utilities/f5-stats-parser.

Parsing is done 100% client-side, and there’s instructions how to host it yourself should you wish to.

Note: It’s better to track these things using telemetry streaming, but the tool is useful in a pinch. 🙂

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *