Forum Discussion

What_Lies_Bene1's avatar
Icon for Cirrostratus rankCirrostratus
Apr 05, 2013


Hi everyone, I'm trying to get my head around iStats, in particular how a key is constructed. Colin's article here is very confusing: For instance, Measure Type is described twice with each definition being different;


"Measure Type - The statistics you want to gather about the subject, I.E. connections, requests, etc."


"Measure Type is counter, or "c" for shorthand"


So, which is it?


I've managed to derive this much;



· Keyspace – dotted tmsh command and module path to the object type you are gathering statistics on (for instance ltm.virtual or ltm.pool)


· Subject Name – the actual name of the object you want to gather statistics on including its Administrative Partition path (for instance /Common/vs_test or /Custom/test_pool)


· Subject Value/Measure – ???


· Measure Type – counter, gauge or string


· Measure Name – a user-defined name for the key


But this doesn't seem to match Colin's examples;


client counter hits


src_ip c Connections


In those two examples what would the keyspace be?


Very confused. Any known working examples anyone has would be great. Thanks


10 Replies

  • Is there a way to remove an ISTAT or set a counter back to zero from an iRule? Can't seem to find a way to do it. I can do "istats remove "ltm.virtual /Common/ counter hits" from the cli, for example, but there doesn't seem to be an associated command available to iRules to do the same thing.


    BTW, there really needs to be some cleanup and expansion on the documentation for ISTATs here. What little information is available is pretty confusing, and often contradicting.


    • James_Deucker_2's avatar
      Historic F5 Account
      Currently there is no way to directly set an iSTAT to a number, you can only read and increment by the negative of the get.
    • Matt_Jannusch_1's avatar
      Icon for Nimbostratus rankNimbostratus
      Thanks James, I ended up incrementing the counter by the negative of the counter and that worked fine! I wanted to keep all the functionality in an iRule as that is easier to maintain (for my customers) than the iCall script method.
  • ruiqiang_lu_121's avatar
    Historic F5 Account

    Yes. You can use { exec istats remove "ltm.pool /Common/test_pool member /Common/ string flag" } in irules.


    • Matt_Jannusch_1's avatar
      Icon for Nimbostratus rankNimbostratus
      Are you doing that in an iCall script, or direct in the iRule? When I try to do it from within the iRule I get "error: [command is disabled: "exec"]". Seems like incrementing by a negative number might get the job done all in the iRule. I'm running v11.4.1, if that makes any difference.