Complex field types
Single scalar values
To query single scalar values, apply the commands that are explained in this section.
Objects
Objects show in braces: {object}
{
"source": "ARP",
"likelihood": 1,
"likelihood_level": "confirmed"
}
An example on how to query only
confirmed
media access control (MAC) addresses.Note: Possible
values are:
Since confirmed
likely
not confirmed
mac_address:info
is an object, you can access
subfields like mac_address:info.likelihood_level
to apply the
where
condition:nodes | select mac_address:info mac_address:info.likelihood_level | where mac_address:info.likelihood_level == confirmed
Since N2OS 24.1 is possible to access complex objects with a different syntax that is compatible with Vantage, using the
/
operator, the query specified above becomes:
nodes | select mac_address:info/likelihood_level | where mac_address:info.likelihood_level == "confirmed"
Note that also the "confirmed"
literal can now be quoted and the query can be executed in Vantage without any change.
Arrays
Note: For example, a
parent
in the alerts
table.Arrays show in braces: {array}
[
"5b867836-2b41-4c15-ab6f-4ae5f0251e30"
]
An example on how to only query alerts that have a parent incident, with a known
incident id with the value: d36d0
Since the
parents
field is an array, you can use
expand
first to get an entry for each parent, then apply your
condition:alerts | expand parents | where expanded_parents include? d36d0
Object arrays
Note: For example,
function_codes
in the links
table.Object arrays are a combination of the above examples. Therefore, they show an object
included in a [{..},{..},.. ] :
[
{
"name": "M-SEARCH",
"is_learned": true,
"is_fully_learned": true
}
]
An example on how to query learned function codes.
Since
function_codes
is an object array, you can use
expand
first, to get an entry for each function code, then use
the .
operator (function_code.is_learned
) to apply
your where
condition:links | select from to protocol function_codes | expand function_codes | where expanded_function_codes.is_learned == true