Forum Discussion
iStats v13 command help
Hi,
Here is help displayed by cli istats command:
Usage: istats [-s ] []
is one of: 'set' 'incr' 'get' 'remove' 'dump' 'drop_row'
'drop_column' 'clear_row'
is a single quoted argument: "keyspace ... "
(like "ltm.pool /Common/mypool counter mystat")
is one of: 'counter' 'gauge' 'string' 'text' 'signed' 'unsigned' 'bin'
'dec' 'hex' 'timestamp' 'timeval' 'uinthex'
must be specified for 'set' and 'incr', and must be an integer for 'incr'
The for a gauge may be negative. Use 2 dashes before the
negative value (like 'incr "... gauge ..." -- -1')
I wonder if there are is any info how to use operations like drop_row, drop_colum, clear_row
What is [-s ]
description "keyspace ... " - what is keyspace and column? If possible some example of key using all above elements and multiple columnsIs there any description what can be stored in types: 'text' 'signed' 'unsigned' 'bin' 'dec' 'hex' 'timestamp' 'timeval' 'uinthex'And how those behave in relation to value used. What is difference between timestamp and timeval. I had ipression that those can be set without using value (like automatically place current time at the moment key is created in value) but it seems not be the case.Piotr
- Steve_MCNimbostratus
Documentation here is atrocious. However, I've been poking around at iStats lately and (through trial and error) I think I can explain how this command actually works.
Basically, setting an iStat goes like this:
istats set "<TABLE_KEYSPACE> <ROW_NAME> <MEASURE_TYPE> <COLUMN_NAME>" # or (via iRule) ISTATS::set "<TABLE_KEYSPACE> <ROW_NAME> <MEASURE_TYPE> <COLUMN_NAME>"
So to create iStats tables that (in our heads) look like this:
# # ---------------- table_1 ---------------- # [column_1] | [column_2] # [ row_1 ] lorem | ipsum # [ row_2 ] dolor | magna # # # ----------------------- table_2 ------------------------ # [column_1] | [column_2] | [column_3] # [ row_1 ] amet | dolore | aliqua #
we would:
istats set "table_1 row_1 string column_1" "lorem" istats set "table_1 row_1 string column_2" "ipsum" istats set "table_1 row_2 string column_1" "dolor" istats set "table_1 row_2 string column_2" "magna" istats set "table_2 row_1 string column_1" "amet" istats set "table_2 row_1 string column_2" "dolore" istats set "table_2 row_1 string column_3" "aliqua"
and to pull that back out we would use:
istats get "table_1 row_2 string column_2" # or grab all iStats istats dump
Straightforward so far, but now we get to those other commands, which should make a lot more sense now that we know what keyspace/row/column all mean in this context.
# istats remove "<TABLE_KEYSPACE> <ROW_NAME> <MEASURE_TYPE> <COLUMN_NAME>" # sets the value to default (does not actually remove anything from the table) istats remove "table_2 row_1 string column_2" # istats drop_row "<TABLE_KEYSPACE> <ROW_NAME>" # actually removes a row from the table istats drop_row "table_1 row_2" # istats drop_column "keyspace <TABLE_KEYSPACE> <MEASURE_TYPE> <COLUMN_NAME>" # removes a column from all rows in a particular table istats drop_column "keyspace table_2 string column_3"
PLEASE NOTE:
It is very dangerous to add too many columns to a particular table. The maximum length of the line (the sum of all columns) is 4032 bytes. If you exceed this limit (which is surprisingly easy to do), you will corrupt your iStats and running any further istats commands will
- produce weird, inconsistent results
- cause the BIG-IP to core and tmm to restart
- rob_carrCirrostratus
How did you even get this much information to display? Could you provide a bit more context for the command?
- rob_carr_76748Nimbostratus
How did you even get this much information to display? Could you provide a bit more context for the command?
- Andy_McGrathCumulonimbus
This is a CLI command equivilant to the iRule
commands (see here for more info DevCentral Wiki - iRules ISTAT).ISTAT
Start with
which is made up of class, object, measure type (counter, gauge, string, text, signed, unsigned, bin, dec, hex, timestamp, timeval, uinthex), and measure name to be separated by whitespace and enclosed in double quotes.key
e.g.
would set an iStat namedistats set "uri /12345 counter Requests
under the classRequests
, object nameduri
and a type of a/12345
counter
The
is simply a way to write iStats to a file for testing e.g.-s
will write the fileistats set -s test.istat "uri /12345 counter Requests" 1
and create the recordtest.istat
as above.Requests
You can then use
oristats get -s test.istat "uri /12345 counter Requests"
which will only read and update the local file and not have any effect on the BIG-IP's actual iStats.istats incr -s test.istat "uri /12345 counter Requests" 1
A good option is to dump the lot using something like
which would look like the following.istats dump -s test.istat
test.istat [READONLY]: nextBlockId=704, last update at 2019-04-10 10:45:02 all facts: [ uri=/12345 ][Requests] = 8 (2019-04-10 10:56:20)
Recommend looking at the following for more info: Introduction to iStats
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