Time Range Selection
AMPS keeps a history of the monitoring interface statistics, and allows that data to be queried. By selecting a leaf node of the monitoring interface resources, a time-based query can be constructed to view a historical report of the information.
A time-based query is created by appending either one or both of the t0
or t1
query parameters to a url of the admin REST interface.
For example, if an administrator wanted to see the number of messages per second consumed by all processors from midnight UTC on November 30, 2011 until 23:25:00 UTC on November 30, 2011, then pointing a browser to:
http://localhost:8085/amps/instance/processors/all/messages_received_per_sec?t0=20111130T0&t1=20111130T232500
will generate the report and output it in the following plain text format (note: entire dataset is not presented, but is truncated).
All times used for the report generation and presentation are ISO-8601 formatted. ISO-8601 formatting is of the following form: YYYYMMDDThhmmss
, where YYYY
is the year, MM
is the month, DD
is the year, T
is a separator between the date and time, hh
is the hours, mm
is the minutes and ss
is the seconds. Decimals are permitted after the ss
units.
All times used for the report generation and presentation are stored and returned in UTC time.
As discussed in the following sections, the date-time range can be used with plain text (html), comma-separated values (csv), json, and XML formats.
Time Based Query Behavior
All times used for the t0
and t1
parameters must be ISO-8601 formatted. ISO-8601 formatting is of the following form: YYYYMMDDThhmmss
, where YYYY
is the year, MM
is the month, DD
is the year, T
is a separator between the date and time, hh
is the hours, mm
is the minutes and ss
is the seconds. Decimals are permitted after the ss
units.
All times used for the t0
and t1
parameters must be in UTC time. All times in the admin interface are stored and compared in UTC time.
The behavior of time based queries is affected by the combination of the t0
and t1
query parameters. These behaviors are described in the table below:
Query Parameter Values | Behavior |
---|---|
Only | The result set is the list of values recorded from time |
Only | The result set is the list of values recorded from the first admin interval recorded in the stats.db of the AMPS instance until time |
Both | The result set is the list of values recorded starting from time |
Both | Returns a single value that represents the recorded value of that statistic at the specific admin interval set by Important: Unlike the other time query behaviors, when selecting a single data point by setting |
Leaf Nodes
A leaf node of the monitoring interface represents a single recorded statistic. Leaf nodes fully support time-range selections using the t0
and t1
parameters as described above.
Examples of leaf node endpoints include:
http://localhost:8085/amps/instance/processors/all/messages_received_per_sec
or
http://localhost:8085/amps/instance/transaction_log/write_latency
Non-Leaf Nodes
A non-leaf node represents an aggregate of related statistics. Non-leaf nodes do not support time-range selections.
Non-leaf nodes support historical queries for a specific valid historical admin interval timestamp. A query for a specific timestamp is achieved by setting the t0
and t1
parameters to the same timestamp value as described above.
Examples of non-leaf node endpoints include:
http://localhost:8085/amps/instance/processors/all
or
http://localhost:8085/amps/instance/transaction_log
Last updated