Metrics selection
Let's learn about the commands that select metrics with the MXQL syntax.
Command | Function |
---|---|
CATEGORY | Select which category to search the data from. This command and operands must be set. |
OKIND | Set to search only the collected data from a specific OKIND . |
OID | Set to search only the collected data from a specific OID . |
ONODE | Set to search only the collected data from a specific ONODE . |
HEADER | Set the value to be passed to the front end. |
TIME-RANGE | Set the start time and end time to search data. |
CATEGORY
Select which category to search the data from. This command and operands must be set.
Operand
-
String: Searches data with a specific category. It always loads data with the
app_counter
category regardless of the lookup time.CATEGORY app_counter
TAGLOAD -
JSON: You can set to select categories depending on the data query time.
Select
app_counter
,app_counter{m5}
, andapp_counter{h1}
categories respectively for the cases where the lookup time is 6 hours, 3 days, or more.CATEGORY {"app_counter":6h, "app_counter{m5}":3d, "app_counter{h1}":unlimit }
TAGLOAD
- Only one value can be specified as the operand of
CATEGORY
. To check the data of multiplecategories
at once, use JOIN. - Depending on the loading method (TAGLOAD or FLEXLOAD), the categories that can be set differ.
- If
{m5}
or{h1}
is attached to the name ofCATEGORY
, see MetricValue.
OID, OKIND, ONODE
Set to search the data extracted from specific OID
, OKIND
, and ONODE
. It can select one value of OID
, OKIND
, and ONODE
.
Operand
You can set a single value as a string or set multiple values as an array of strings.
CATEGORY app_counter
OID 1388369480
TAGLOAD
CATEGORY app_counter
OID [1388369480, 1388369481]
TAGLOAD
CATEGORY app_active_stat
ONODE 1693789385
TAGLOAD
- It can select one value of
OID
,OKIND
, andONODE
. - Instructions that have not input operands (or have not passed parameter values) are ignored.
- If
OID
,OKIND
, andONODE
are used repeatedly, only the last entered command is applied. - Because
OIDSET
is deprecated, it is recommended to use a command ofOID
,OKIND
, andONODE
. - It is different from applying FILTER in the data processing step in that only the required data is searched from the data loading step.
In case of OKIND
and ONODE
commands, only when the okind
and onode
related fields (okind
, onode
, okindName
, onodeName
) are included, they can be used in the CATEGORY
command. In Sitemap > Analysis > Metrics Search, you can see which categories contain which fields.
HEADER
The data searched by MXQL is used in the widget of the Flex Board. You can set information about which fields (of the data searched by MXQL) and which type have been used to express the widget of the Flex Board.
Operand
You can set only with JSON strings.
HEADER { apdex_satisfied$:I, apdex_tolerated$:I, apdex_total$:I, apdex$:F, category: app_counter}
OID $oid
CATEGORY app_counter
TAGLOAD
It must be passed depending on the format used by the widget of the Flex Board.
TIME-RANGE
You can set the data lookup time range. Basically, you can use DatePicker from Test environment to set the time. If this command is used in the test environment, the value set for DatePicker is ignored.
-
Retrieving data only for the last 15 seconds
TIME-RANGE { recent : 15s }
CATEGORY app_counter
TAGLOAD
SELECT -
Retrieving data only for the previous 15 seconds before
etime
(passesetime
as a parameter)TIME-RANGE {duration:15s, etime:$etime}
CATEGORY app_counter
TAGLOAD
SELECT -
Retrieving data only for 15 seconds from
stime
(passesstime
as a parameter)TIME-RANGE {duration:15s, stime:$stime}
CATEGORY app_counter
TAGLOAD
SELECT