Forum Discussion
iStats Gauge and String options - any experience?
- May 24, 2021
Yes, it's exactly as you said.
An example of decrementing a gauge value is:
istats incr "uri /api gauge curr_reqs" -- -3
Regards,
Dario.
Hello AlexBCT.
Counter, Gauge and String are just measure types, not a format types.
String is a text, and the difference between counter and gauge is bit sutil (similar to counter and gauge difference in SNMP).
F5-BIGIP-LOCAL-MIB::ltmServerSslMaxActiveHandshake."/Common/crypto-client-default-serverssl" = Gauge32: 0
F5-BIGIP-LOCAL-MIB::ltmServerSslStatHandshakeFailures."/Common/serverssl" = Counter64: 0
Counters only increase, but gauge could increase or decrease (it allows you to set a negative increment).
[root@spissa:Active:Standalone] alertd # istats -help
Usage: istats <operation> [-s <segment-filename>] <key> [<value>]
<operation> is one of: 'set' 'incr' 'get' 'remove' 'dump' 'drop_row'
'drop_column' 'clear_row'
<key> is a single quoted argument: "keyspace <table> <column> <value> ... <type> <measure>"
(like "ltm.pool /Common/mypool counter mystat")
<type> is one of: 'counter' 'gauge' 'string' 'text' 'signed' 'unsigned' 'bin'
'dec' 'hex' 'timestamp' 'timeval' 'uinthex'
<value> must be specified for 'set' and 'incr', and must be an integer for 'incr'
The <value> for a gauge may be negative. Use 2 dashes before the
negative value (like 'incr "... gauge ..." -- -1')
Regards,
Dario.
So conceptually you might use a counter to record say the total connections handled by an iRule (incrementing on client_accept) and a guage to record the current connections (incrementing on client_accept, decrementing on client_closed)?
- May 24, 2021
Yes, it's exactly as you said.
An example of decrementing a gauge value is:
istats incr "uri /api gauge curr_reqs" -- -3
Regards,
Dario.
- AlexBCTMay 25, 2021Cumulonimbus
Ah, makes sense now - I think my understanding that it was taking the average of a bunch of values seems to have been wrong.
Thanks both!
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