@dx-do/cli 5.2.49 → 5.2.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -6
- package/dist-node/01-discover-vertices.tas-pwngv2fz.md +31 -0
- package/dist-node/01-discover-vertices.tas.data-store-svjfrm1f.json5 +29 -0
- package/dist-node/01-discover-vertices.tas.data-store-tmd-w650nfzt.json +4 -0
- package/dist-node/02-discover-services.tas-867m0m88.md +30 -0
- package/dist-node/02-discover-services.tas.data-store-jz0gx5vn.json5 +40 -0
- package/dist-node/02-discover-services.tas.data-store-tmd-eq264m6y.json +4 -0
- package/dist-node/03-discover-sources.nassql-4tgp9jvv.md +34 -0
- package/dist-node/03-discover-sources.nassql.data-store-by6sqk23.json5 +63 -0
- package/dist-node/03-discover-sources.nassql.data-store-tmd-n3gy57wm.json +4 -0
- package/dist-node/04-discover-metadata-columns.nassql-vhzb0mrq.md +26 -0
- package/dist-node/04-discover-metadata-columns.nassql.data-store-c9zr7p0q.json5 +35 -0
- package/dist-node/04-discover-metadata-columns.nassql.data-store-tmd-4ygrjvty.json +4 -0
- package/dist-node/10-filter-attribute-matches.tas-tafqmtw1.md +33 -0
- package/dist-node/10-filter-attribute-matches.tas.data-store-tmd-m2sendv0.json +4 -0
- package/dist-node/10-filter-attribute-matches.tas.data-store-whdc6vbc.json5 +35 -0
- package/dist-node/11-filter-and-compose.tas-m8856738.md +29 -0
- package/dist-node/11-filter-and-compose.tas.data-store-dh5meyk8.json5 +56 -0
- package/dist-node/11-filter-and-compose.tas.data-store-tmd-mfn8a16f.json +4 -0
- package/dist-node/12-filter-or-not.tas-21zab96s.md +35 -0
- package/dist-node/12-filter-or-not.tas.data-store-7vjr4fnd.json5 +83 -0
- package/dist-node/12-filter-or-not.tas.data-store-tmd-am9smwe5.json +4 -0
- package/dist-node/13-filter-layer.tas-r1ff5anv.md +29 -0
- package/dist-node/13-filter-layer.tas.data-store-5mneyz77.json5 +30 -0
- package/dist-node/13-filter-layer.tas.data-store-tmd-9qmhyfzr.json +4 -0
- package/dist-node/14-filter-traverse.tas-da9jene0.md +38 -0
- package/dist-node/14-filter-traverse.tas.data-store-p0vxtfvj.json5 +63 -0
- package/dist-node/14-filter-traverse.tas.data-store-tmd-5hepg5wf.json +4 -0
- package/dist-node/15-filter-take-vertices-edges.tas-m160qc7z.md +35 -0
- package/dist-node/15-filter-take-vertices-edges.tas.data-store-drmcme43.json5 +46 -0
- package/dist-node/15-filter-take-vertices-edges.tas.data-store-tmd-8fewsp5s.json +4 -0
- package/dist-node/16-filter-projection.tas-dh39mcx8.md +31 -0
- package/dist-node/16-filter-projection.tas.data-store-tmd-3r8anggx.json +4 -0
- package/dist-node/16-filter-projection.tas.data-store-xjbdry1x.json5 +36 -0
- package/dist-node/17-filter-lucene.tas-gyvtzwaa.md +29 -0
- package/dist-node/17-filter-lucene.tas.data-store-1knw6srt.json5 +39 -0
- package/dist-node/17-filter-lucene.tas.data-store-tmd-5cf3tygg.json +5 -0
- package/dist-node/18-filter-variable-reuse.tas-89fq0y6x.md +46 -0
- package/dist-node/18-filter-variable-reuse.tas.data-store-by35113t.json5 +55 -0
- package/dist-node/18-filter-variable-reuse.tas.data-store-tmd-ak7aprgk.json +4 -0
- package/dist-node/19-filter-order-statefilter.tas-hm3z71qj.md +36 -0
- package/dist-node/19-filter-order-statefilter.tas.data-store-ra9hj1rz.json5 +51 -0
- package/dist-node/19-filter-order-statefilter.tas.data-store-tmd-wqer9xy2.json +4 -0
- package/dist-node/20-nassql-from-metadata-basic.nassql-szr2xax1.md +28 -0
- package/dist-node/20-nassql-from-metadata-basic.nassql.data-store-tmd-c7drxs1m.json +4 -0
- package/dist-node/20-nassql-from-metadata-basic.nassql.data-store-zdf1gp1v.json5 +42 -0
- package/dist-node/21-nassql-from-metadata-regex.nassql-78jnsn3e.md +30 -0
- package/dist-node/21-nassql-from-metadata-regex.nassql.data-store-ckzsv7h1.json5 +53 -0
- package/dist-node/21-nassql-from-metadata-regex.nassql.data-store-tmd-zgr6r9my.json +4 -0
- package/dist-node/22-nassql-from-topology.nassql-a71qw9r0.md +42 -0
- package/dist-node/22-nassql-from-topology.nassql.data-store-81m23nge.json5 +58 -0
- package/dist-node/22-nassql-from-topology.nassql.data-store-tmd-vhpjy6c7.json +4 -0
- package/dist-node/23-nassql-join-topology-metadata.nassql-hywxhcg2.md +35 -0
- package/dist-node/23-nassql-join-topology-metadata.nassql.data-store-da7q90n2.json5 +76 -0
- package/dist-node/23-nassql-join-topology-metadata.nassql.data-store-tmd-rr8wt9qa.json +4 -0
- package/dist-node/24-nassql-from-data-window-mean.nassql-q6qsgdxw.md +33 -0
- package/dist-node/24-nassql-from-data-window-mean.nassql.data-store-j7xmg7fc.json5 +81 -0
- package/dist-node/24-nassql-from-data-window-mean.nassql.data-store-tmd-qgzz2f7v.json +4 -0
- package/dist-node/25-nassql-group-order-top.nassql-awgnwn3r.md +30 -0
- package/dist-node/25-nassql-group-order-top.nassql.data-store-cmrn300b.json5 +48 -0
- package/dist-node/25-nassql-group-order-top.nassql.data-store-tmd-7xpqeh7c.json +4 -0
- package/dist-node/26-nassql-filter-predicate.nassql-2t27h5ev.md +41 -0
- package/dist-node/26-nassql-filter-predicate.nassql.data-store-k2rgp609.json5 +59 -0
- package/dist-node/26-nassql-filter-predicate.nassql.data-store-tmd-m4dddgwm.json +4 -0
- package/dist-node/27-nassql-distinct-keep.nassql-6z55dvk3.md +24 -0
- package/dist-node/27-nassql-distinct-keep.nassql.data-store-mrx00ys5.json5 +52 -0
- package/dist-node/27-nassql-distinct-keep.nassql.data-store-tmd-0p9hy42g.json +4 -0
- package/dist-node/28-nassql-format-time.nassql-6wraqgdk.md +30 -0
- package/dist-node/28-nassql-format-time.nassql.data-store-tmd-bbbqhz1x.json +4 -0
- package/dist-node/28-nassql-format-time.nassql.data-store-tvy8y2cs.json5 +59 -0
- package/dist-node/29-nassql-describe-log.nassql-t9vnxeb0.md +31 -0
- package/dist-node/29-nassql-describe-log.nassql.data-store-tmd-q4mtczy8.json +4 -0
- package/dist-node/29-nassql-describe-log.nassql.data-store-x16y4crx.json5 +51 -0
- package/dist-node/30-nassql-map-string.nassql-f2tdknzs.md +30 -0
- package/dist-node/30-nassql-map-string.nassql.data-store-t8ahcabn.json5 +53 -0
- package/dist-node/30-nassql-map-string.nassql.data-store-tmd-a6xq0bdx.json +4 -0
- package/dist-node/31-nassql-join-data-sum.nassql-p16y3xk6.md +26 -0
- package/dist-node/31-nassql-join-data-sum.nassql.data-store-dje7wm6v.json5 +64 -0
- package/dist-node/31-nassql-join-data-sum.nassql.data-store-tmd-c1pyx1qw.json +4 -0
- package/dist-node/32-nassql-bottom-aggregation.nassql-hpgfn77p.md +26 -0
- package/dist-node/32-nassql-bottom-aggregation.nassql.data-store-tmd-p0ssj1vc.json +4 -0
- package/dist-node/32-nassql-bottom-aggregation.nassql.data-store-v9580caa.json5 +43 -0
- package/dist-node/33-nassql-cross-domain-pipeline.nassql-fm0ynphf.md +45 -0
- package/dist-node/33-nassql-cross-domain-pipeline.nassql.data-store-tmd-18881drs.json +4 -0
- package/dist-node/33-nassql-cross-domain-pipeline.nassql.data-store-vqs9hkx4.json5 +79 -0
- package/dist-node/3rdpartylicenses-hx59bakt.txt +885 -0
- package/dist-node/50-discover-custom-layers.tas-2hvvpkzw.md +66 -0
- package/dist-node/50-discover-custom-layers.tas.data-store-h85zgna9.json5 +36 -0
- package/dist-node/50-discover-custom-layers.tas.data-store-tmd-hagn9eak.json +4 -0
- package/dist-node/51-collect-counts-everything.tas-nz0ksgdc.md +46 -0
- package/dist-node/51-collect-counts-everything.tas.data-store-eypcjah8.json5 +48 -0
- package/dist-node/51-collect-counts-everything.tas.data-store-tmd-4pcj94s9.json +4 -0
- package/dist-node/52-collect-counts-bulk.tas-eerw4z8s.md +54 -0
- package/dist-node/52-collect-counts-bulk.tas.data-store-scedtw1m.json5 +65 -0
- package/dist-node/52-collect-counts-bulk.tas.data-store-tmd-csyzj189.json +4 -0
- package/dist-node/53-collect-attributes-by-type.tas-cw0285hx.md +71 -0
- package/dist-node/53-collect-attributes-by-type.tas.data-store-fvjge4yr.json5 +65 -0
- package/dist-node/53-collect-attributes-by-type.tas.data-store-tmd-274qrd8f.json +4 -0
- package/dist-node/README-ghxecaz0.md +84 -0
- package/dist-node/SKILL-1xn7r9nt.md +104 -0
- package/dist-node/agent-25q752kd.md +55 -0
- package/dist-node/agent_connection_and_status-0dq7zkpc.md +62 -0
- package/dist-node/agent_source_collector-6s06n3rs.md +40 -0
- package/dist-node/agentic-mcp-rycd2gh8.md +140 -0
- package/dist-node/application-dfva8tz0.md +48 -0
- package/dist-node/application-m0q2vaxj.md +74 -0
- package/dist-node/attribute_resource_metric_name-pxrceab5.md +56 -0
- package/dist-node/browseragent-snippet.template-9megjp8a.html +12 -0
- package/dist-node/bulkvertexpatch-1a4qy5vb.md +78 -0
- package/dist-node/bundle.pbd-38r15kyd.template +13 -0
- package/dist-node/bundle.profile-1wpzpt3d.template +2 -0
- package/dist-node/business_transaction-mbqz5ex9.md +61 -0
- package/dist-node/chunk-4I3HBO6U-2ebgf7kh.js +127 -0
- package/dist-node/chunk-4PMCLJMS-0mqvr4m4.js +1 -0
- package/dist-node/chunk-5VSFINOX-ewzpx7wh.js +5 -0
- package/dist-node/chunk-72HYG3XZ-kf7hy4vs.js +3625 -0
- package/dist-node/chunk-JRM4BLOM-rg32z8w4.js +1 -0
- package/dist-node/chunk-Q2JA73UH-akkb8bh3.js +14 -0
- package/dist-node/chunk-RNMHSXZF-pdwasrg7.js +1358 -0
- package/dist-node/chunk-VV2FJEMA-3rvtkmga.js +321 -0
- package/dist-node/chunk-YVD3UK5I-9pxr1jka.js +695 -0
- package/dist-node/configuration-1vczsdex.md +104 -0
- package/dist-node/dashboards-x0xddksy.md +17 -0
- package/dist-node/database_or_inferred-8vqf5gyr.md +75 -0
- package/dist-node/default-licensing-config-0p879qpb.template +122 -0
- package/dist-node/dependency-3b0neg5x.md +40 -0
- package/dist-node/description.md-qwc2bj9r.template +30 -0
- package/dist-node/discovery-flow-fw79kbx4.md +116 -0
- package/dist-node/dxi_service-13prnpd5.md +59 -0
- package/dist-node/entity-relationships-cevz61kj.md +142 -0
- package/dist-node/gotchas-8ab64kcd.md +389 -0
- package/dist-node/host-es6fxtgx.md +46 -0
- package/dist-node/host-j3qqrm5f.md +55 -0
- package/dist-node/index-104hyb1m.html +13 -0
- package/dist-node/index-7fp2dfas.json +178 -0
- package/dist-node/index-g3hh5wez.json +403 -0
- package/dist-node/index-mbzg9rhc.json +270 -0
- package/dist-node/index-qffdhwgm.json +2479 -0
- package/dist-node/inferred-w998vfq1.md +41 -0
- package/dist-node/installInstructions.md-k9ghf3dr.template +21 -0
- package/dist-node/inventorize-xc9h9bjr.md +34 -0
- package/dist-node/investigation-planning-6kcm01h9.md +149 -0
- package/dist-node/investigator-flow-jc2s0n46.md +186 -0
- package/dist-node/k8s_deployment_and_namespace-69c29152.md +88 -0
- package/dist-node/k8s_pod_and_container-9h4v6cmj.md +64 -0
- package/dist-node/main-SGLYO5YX-ht69eb0y.js +13 -0
- package/dist-node/main.js +397415 -0
- package/dist-node/marketplace-srdmzxkj.json +15 -0
- package/dist-node/metric-source-names-6cbczyks.md +75 -0
- package/dist-node/metrics-grounding-2h4kkbe3.md +130 -0
- package/dist-node/mm-cookbook-23jpw721.md +231 -0
- package/dist-node/mm-quickstart-x2adfc16.md +106 -0
- package/dist-node/nassql-cookbook-n8kc0mff.md +812 -0
- package/dist-node/nassql-quickstart-090e0yex.md +149 -0
- package/dist-node/plugin-c3bavxvf.json +18 -0
- package/dist-node/polyfills-A7ZF72EO-mp884a0b.js +2 -0
- package/dist-node/prerendered-routes-523d8gat.json +3 -0
- package/dist-node/primeicons-4GST5W3O-jac3wxrf.woff2 +0 -0
- package/dist-node/primeicons-DHQU4SEP-760n99pp.svg +345 -0
- package/dist-node/primeicons-GEFHGEHP-rc4kaa3b.ttf +0 -0
- package/dist-node/primeicons-P53SE5CV-4saz3d5j.woff +0 -0
- package/dist-node/primeicons-RSSEDYLY-4d4vbd67.eot +0 -0
- package/dist-node/query-vs-analysis-separation-sag1ezcq.md +97 -0
- package/dist-node/run-query-vs-run-partial-6138pc94.md +80 -0
- package/dist-node/service-5pz5nhzf.md +133 -0
- package/dist-node/service-hierarchies-87a4ynpj.md +178 -0
- package/dist-node/service-k4f5mkbq.md +51 -0
- package/dist-node/servlet_or_frontend-1kjcb7ar.md +76 -0
- package/dist-node/src-apm-mfnsq6vw.svg +4 -0
- package/dist-node/src-axa-nn28yqmj.svg +4 -0
- package/dist-node/src-dxim-fv7ne4qa.svg +4 -0
- package/dist-node/styles-23VUPSCU-9ehggc1f.css +1 -0
- package/dist-node/tas-cookbook-0y4826rp.md +693 -0
- package/dist-node/tas-quickstart-wgcvwffc.md +138 -0
- package/dist-node/time-format-0595g01j.md +41 -0
- package/dist-node/toggles.pbd-9wscbmng.template +2 -0
- package/dist-node/type-host-agbhmn6v.svg +6 -0
- package/dist-node/type-metric-p9b90bpx.svg +4 -0
- package/dist-node/type-service-k7f1x71k.svg +4 -0
- package/dist-node/ui-0b5grqrg.md +113 -0
- package/dist-node/universe-b9nhf325.md +47 -0
- package/dist-node/universe-fzpwzvxr.md +91 -0
- package/dist-node/universes-and-scopes-1cb9pfk7.md +105 -0
- package/dist-node/vertex_entity_node-mm3yp9d0.md +31 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# 13-filter-layer (TAS)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Demonstrate the `LAYER` filter, which selects vertices belonging to a specific topology layer.
|
|
6
|
+
|
|
7
|
+
## Query Construction
|
|
8
|
+
|
|
9
|
+
Uses `LAYER` with `value: "ATC"` (Application Transaction Context layer). Layers are a top-level organizational concept in the topology — each vertex belongs to exactly one layer, conventionally identified by the first segment of its `externalId`.
|
|
10
|
+
|
|
11
|
+
## API Surface Exercised
|
|
12
|
+
|
|
13
|
+
- **Filter**: `LAYER` with `value` (single string)
|
|
14
|
+
- The schema also supports `values` (array) for matching multiple layers
|
|
15
|
+
|
|
16
|
+
## Expected Output
|
|
17
|
+
|
|
18
|
+
Returns up to 50 vertices in the ATC layer. Typically this includes `BUSINESSTRANSACTION` vertices (web-app endpoints reported by APM) and `INFERRED_DATABASE` vertices (databases discovered behind those transactions).
|
|
19
|
+
|
|
20
|
+
## What the Results Tell You
|
|
21
|
+
|
|
22
|
+
Common DXO2 topology layers (discovered from externalId prefixes — the exact set on a given tenant depends on which connectors and agents are reporting):
|
|
23
|
+
- **ATC** — Application Transaction Context (business transactions, databases)
|
|
24
|
+
- **APM_INFRASTRUCTURE** — Agents, agent connections, DXI services
|
|
25
|
+
- **INFRASTRUCTURE** — Hosts, k8s entities (pods, containers, deployments, namespaces)
|
|
26
|
+
- **CONNECTOR_METADATA** — Connectors and products (present when the tenant uses connectors that publish to this layer)
|
|
27
|
+
- **ACN_CONFIGURATION** — Agent configuration entities (present when ACN-style configuration is in use)
|
|
28
|
+
|
|
29
|
+
By convention, the layer name appears as the first segment of each vertex's `externalId` (e.g., `ATC:BUSINESSTRANSACTION:...`), though this is a convention, not a rule.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* `LAYER` filter — restrict to vertices in a single topology layer.
|
|
3
|
+
* Layers are the top-level organizational concept (every vertex
|
|
4
|
+
* belongs to exactly one); `entities/host` and `entities/agent`
|
|
5
|
+
* cover which types live where.
|
|
6
|
+
*
|
|
7
|
+
* Note `value` (singular string) for one layer; the filter also
|
|
8
|
+
* supports `values` (array of strings) for OR-matching multiple
|
|
9
|
+
* layers — useful when scoping across related layers (e.g. ATC +
|
|
10
|
+
* APM_INFRASTRUCTURE for an APM-side question).
|
|
11
|
+
*
|
|
12
|
+
* Use `discovery_layers` to enumerate valid layer names on the
|
|
13
|
+
* bound tenant before authoring. Common layers: ATC,
|
|
14
|
+
* APM_INFRASTRUCTURE, INFRASTRUCTURE, CONNECTOR_METADATA,
|
|
15
|
+
* ACN_CONFIGURATION, plus tenant-specific ones from connectors.
|
|
16
|
+
*/
|
|
17
|
+
{
|
|
18
|
+
/*
|
|
19
|
+
* Single-value LAYER filter — the cheapest way to scope. `ATC`
|
|
20
|
+
* (Application Transaction Context) is where business
|
|
21
|
+
* transactions and inferred databases live. To match multiple
|
|
22
|
+
* layers, use `values: [...]` (array form) instead.
|
|
23
|
+
*/
|
|
24
|
+
"filter": {
|
|
25
|
+
"op": "LAYER",
|
|
26
|
+
"value": "ATC"
|
|
27
|
+
},
|
|
28
|
+
"limit": 50,
|
|
29
|
+
"projection": "DETAILED"
|
|
30
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# 14-filter-traverse (TAS)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Demonstrate the `TRAVERSE` filter, which starts from a seed set of vertices and follows edges to discover connected vertices up to a configurable depth.
|
|
6
|
+
|
|
7
|
+
## Query Construction
|
|
8
|
+
|
|
9
|
+
1. **Seed**: `ATTRIBUTE` filter selects `k8s_CLUSTER` vertices (whatever clusters happen to be reporting on the tenant)
|
|
10
|
+
2. **Traverse**: Follows edges in `ANY` direction with `repeat: 2` (two hops)
|
|
11
|
+
3. **includeInput**: `true` includes the seed cluster vertex in the result
|
|
12
|
+
|
|
13
|
+
The `traverse` field is an **array** of `Traverse` objects. Each specifies:
|
|
14
|
+
- `direction`: `FORWARD`, `BACKWARD`, or `ANY`
|
|
15
|
+
- `repeat`: How many hops to take (equivalent to "depth")
|
|
16
|
+
- Optional `vertexFilter`/`edgeFilter`: Can constrain which vertices or edges to follow
|
|
17
|
+
|
|
18
|
+
## API Surface Exercised
|
|
19
|
+
|
|
20
|
+
- **Filter**: `TRAVERSE` with `input`, `traverse`, `includeInput`
|
|
21
|
+
- **Traverse spec**: `direction`, `repeat`
|
|
22
|
+
- **Nesting**: ATTRIBUTE filter as input to TRAVERSE
|
|
23
|
+
|
|
24
|
+
## Expected Output
|
|
25
|
+
|
|
26
|
+
Returns up to 100 vertices: the k8s_CLUSTER vertex plus all vertices reachable within 2 hops. Typical results include:
|
|
27
|
+
- The cluster itself
|
|
28
|
+
- k8s_NAMESPACE vertices (e.g. `tixchange-v1`, `tixchange-v2`, `monitoring-system`, plus standard ones like `kube-system`)
|
|
29
|
+
- k8s_DEPLOYMENT, k8s_DAEMONSET vertices
|
|
30
|
+
- k8s_POD vertices
|
|
31
|
+
- HOST vertices
|
|
32
|
+
- AGENT vertices connected to those hosts
|
|
33
|
+
|
|
34
|
+
## What the Results Tell You
|
|
35
|
+
|
|
36
|
+
`TRAVERSE` is the primary way to explore graph relationships. The `repeat` parameter controls depth — `repeat: 1` gives immediate neighbors, `repeat: 2` gives two-hop neighbors. With `direction: "ANY"`, traversal follows edges regardless of direction (both parent→child and child→parent relationships).
|
|
37
|
+
|
|
38
|
+
Note that the result includes only vertices by default. To see the edges, use `TAKE_EDGES` (see query 15).
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* `TRAVERSE` filter — start from a SEED set of vertices and follow
|
|
3
|
+
* edges to discover connected vertices up to a configurable depth.
|
|
4
|
+
* The primary tool for "find things related to X" investigative
|
|
5
|
+
* questions.
|
|
6
|
+
*
|
|
7
|
+
* Pattern: ATTRIBUTE filter selects the seed (here: k8s_CLUSTERs);
|
|
8
|
+
* TRAVERSE walks edges out from those seeds. `repeat: 2` means
|
|
9
|
+
* follow 2 hops; `direction: ANY` ignores edge directionality
|
|
10
|
+
* (FORWARD / BACKWARD restrict to one).
|
|
11
|
+
*/
|
|
12
|
+
{
|
|
13
|
+
/*
|
|
14
|
+
* TRAVERSE wraps a seed filter and extends with edge-walking
|
|
15
|
+
* configuration. The result is the union of seeds (when
|
|
16
|
+
* includeInput=true) AND everything reachable in N hops.
|
|
17
|
+
*/
|
|
18
|
+
"filter": {
|
|
19
|
+
"op": "TRAVERSE",
|
|
20
|
+
/*
|
|
21
|
+
* The seed: k8s_CLUSTER vertices (the starting points).
|
|
22
|
+
* Picking a tight seed is critical — TRAVERSE from a too-broad
|
|
23
|
+
* seed (e.g. ALL hosts) will explode the result set across
|
|
24
|
+
* the whole topology.
|
|
25
|
+
*/
|
|
26
|
+
"input": {
|
|
27
|
+
"op": "ATTRIBUTE",
|
|
28
|
+
"expressions": [
|
|
29
|
+
{
|
|
30
|
+
"name": "type",
|
|
31
|
+
"values": ["k8s_CLUSTER"],
|
|
32
|
+
"operator": "IN"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
/*
|
|
37
|
+
* `traverse` is an ARRAY of hop specs, applied sequentially.
|
|
38
|
+
* One element here = "one round of traversal." Each element:
|
|
39
|
+
* direction: FORWARD | BACKWARD | ANY
|
|
40
|
+
* repeat: how many times to apply this hop spec
|
|
41
|
+
* vertexFilter / edgeFilter (optional): constrain which
|
|
42
|
+
* vertices/edges to follow on this round
|
|
43
|
+
*
|
|
44
|
+
* For multi-stage traversal (e.g. cluster → namespace →
|
|
45
|
+
* deployments only), use multiple array elements with
|
|
46
|
+
* vertex/edgeFilter on each.
|
|
47
|
+
*/
|
|
48
|
+
"traverse": [
|
|
49
|
+
{
|
|
50
|
+
"direction": "ANY",
|
|
51
|
+
"repeat": 2
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
/*
|
|
55
|
+
* includeInput=true returns the seed vertices alongside what
|
|
56
|
+
* was reached via traversal. Set false when you want only the
|
|
57
|
+
* neighborhood, not the seeds.
|
|
58
|
+
*/
|
|
59
|
+
"includeInput": true
|
|
60
|
+
},
|
|
61
|
+
"limit": 100,
|
|
62
|
+
"projection": "DETAILED"
|
|
63
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# 15-filter-take-vertices-edges (TAS)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Demonstrate the `TAKE_EDGES` graph-shaping filter, which extracts edges from a graph result produced by traversal.
|
|
6
|
+
|
|
7
|
+
## Query Construction
|
|
8
|
+
|
|
9
|
+
Wraps the same TRAVERSE from query 14 (k8s_CLUSTER → 2 hops) inside `TAKE_EDGES`:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
TAKE_EDGES
|
|
13
|
+
└── TRAVERSE (from k8s_CLUSTER, depth=2, includeInput=true)
|
|
14
|
+
└── ATTRIBUTE(type IN [k8s_CLUSTER])
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## API Surface Exercised
|
|
18
|
+
|
|
19
|
+
- **Filter**: `TAKE_EDGES` — extracts only edges from the result, discarding vertices
|
|
20
|
+
- **Composition**: TAKE_EDGES wrapping TRAVERSE wrapping ATTRIBUTE
|
|
21
|
+
|
|
22
|
+
The companion filter `TAKE_VERTICES` does the opposite — extracts only vertices. Together they allow decomposing a graph result into its vertex and edge components.
|
|
23
|
+
|
|
24
|
+
## Expected Output
|
|
25
|
+
|
|
26
|
+
Returns 0 vertices and 100 edges. Each edge has:
|
|
27
|
+
- `id` — numeric edge ID
|
|
28
|
+
- `sourceId` / `targetId` — vertex IDs at each end
|
|
29
|
+
- `attributes` — edge metadata (type, layer, etc.)
|
|
30
|
+
|
|
31
|
+
## What the Results Tell You
|
|
32
|
+
|
|
33
|
+
`TAKE_EDGES` is essential for understanding the relationships between topology entities. Without it, traversal results include only vertices. The edges reveal the actual graph structure: which namespaces belong to which cluster, which deployments are in which namespace, etc.
|
|
34
|
+
|
|
35
|
+
Other graph-shaping filters in the same family: `TAKE_VERTICES`, `TAKE_FLOWS`, `ADD_FLOWS`, `ADD_WIRES`, `ADD_WIRE_CONTEXT`, `ADD_TRANSITIONING_EDGES`.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* `TAKE_EDGES` — wrap a TRAVERSE-shaped filter to extract the EDGES
|
|
3
|
+
* walked, not (only) the vertices. Default TAS query results
|
|
4
|
+
* include only vertices unless you opt into edges via TAKE_EDGES
|
|
5
|
+
* (or TAKE_VERTICES for the symmetric op).
|
|
6
|
+
*
|
|
7
|
+
* Use TAKE_EDGES when you need the relationship metadata: edge
|
|
8
|
+
* type, attributes, source/target IDs. The edges become the
|
|
9
|
+
* primary result; the vertices appear as graph metadata
|
|
10
|
+
* referenced by the edges.
|
|
11
|
+
*
|
|
12
|
+
* Inner shape is identical to query #14 (k8s_CLUSTER traversal);
|
|
13
|
+
* the only difference is the TAKE_EDGES wrapper at the top.
|
|
14
|
+
*/
|
|
15
|
+
{
|
|
16
|
+
/*
|
|
17
|
+
* TAKE_EDGES wraps a TRAVERSE (or any vertex-shaped filter) and
|
|
18
|
+
* returns the edges encountered. The `input` is what produces
|
|
19
|
+
* the vertex set whose edges to take.
|
|
20
|
+
*/
|
|
21
|
+
"filter": {
|
|
22
|
+
"op": "TAKE_EDGES",
|
|
23
|
+
"input": {
|
|
24
|
+
"op": "TRAVERSE",
|
|
25
|
+
"input": {
|
|
26
|
+
"op": "ATTRIBUTE",
|
|
27
|
+
"expressions": [
|
|
28
|
+
{
|
|
29
|
+
"name": "type",
|
|
30
|
+
"values": ["k8s_CLUSTER"],
|
|
31
|
+
"operator": "IN"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"traverse": [
|
|
36
|
+
{
|
|
37
|
+
"direction": "ANY",
|
|
38
|
+
"repeat": 2
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"includeInput": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"limit": 100,
|
|
45
|
+
"projection": "DETAILED"
|
|
46
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 16-filter-projection (TAS)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Demonstrate the `projectionFilter` query option, which limits which attributes are returned on each vertex — reducing response size and focusing on relevant data.
|
|
6
|
+
|
|
7
|
+
## Query Construction
|
|
8
|
+
|
|
9
|
+
Queries all `k8s_POD` vertices but uses `projectionFilter.attributes` to request only:
|
|
10
|
+
- `name` — pod name
|
|
11
|
+
- `type` — vertex type
|
|
12
|
+
- `hostname` — host the pod runs on
|
|
13
|
+
- `k8s_namespace` — Kubernetes namespace
|
|
14
|
+
- `k8s_status` — pod status
|
|
15
|
+
|
|
16
|
+
Without `projectionFilter`, vertices would include all 20+ attributes. With it, each vertex's `attributes` map contains only the requested fields (if they exist on that vertex).
|
|
17
|
+
|
|
18
|
+
## API Surface Exercised
|
|
19
|
+
|
|
20
|
+
- **projectionFilter**: `{ attributes: [...] }` — whitelist of attribute names to include
|
|
21
|
+
- The schema also supports `attributeValueAsFields` for renaming attributes in the response
|
|
22
|
+
|
|
23
|
+
## Expected Output
|
|
24
|
+
|
|
25
|
+
Returns 30 k8s_POD vertices, each with a minimal attribute set. Attributes not in the projection list are omitted.
|
|
26
|
+
|
|
27
|
+
## What the Results Tell You
|
|
28
|
+
|
|
29
|
+
Projection filters are important for performance. A single vertex can have dozens of attributes. When building UIs or processing large result sets, requesting only the needed attributes reduces bandwidth and parsing overhead.
|
|
30
|
+
|
|
31
|
+
Note: The `projection` field (`"DETAILED"`, `"DEFAULT"`, `"ID_ONLY"`) controls the overall detail level, while `projectionFilter` provides fine-grained attribute selection. When `projectionFilter` is used, the `projection` field is typically omitted.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* `projectionFilter` — a per-attribute selection list. Where
|
|
3
|
+
* `projection: DETAILED` returns ALL attributes per vertex,
|
|
4
|
+
* `projectionFilter: { attributes: [...] }` returns ONLY the
|
|
5
|
+
* named attributes. Use to reduce response size when you know
|
|
6
|
+
* exactly which attributes you care about — e.g. building a
|
|
7
|
+
* UI list / table / dropdown.
|
|
8
|
+
*
|
|
9
|
+
* Note: `projection` (singular, the breadth setting:
|
|
10
|
+
* DETAILED/BRIEF/NO_TYPE) and `projectionFilter` (the per-attribute
|
|
11
|
+
* whitelist) are independent. You can omit `projection` and use
|
|
12
|
+
* just `projectionFilter` for the tightest response shape.
|
|
13
|
+
*/
|
|
14
|
+
{
|
|
15
|
+
"filter": {
|
|
16
|
+
"op": "ATTRIBUTE",
|
|
17
|
+
"expressions": [
|
|
18
|
+
{
|
|
19
|
+
"name": "type",
|
|
20
|
+
"values": ["k8s_POD"],
|
|
21
|
+
"operator": "IN"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"limit": 30,
|
|
26
|
+
/*
|
|
27
|
+
* Per-attribute whitelist. The named attributes are always
|
|
28
|
+
* returned; everything else is omitted. NO error if an
|
|
29
|
+
* attribute doesn't exist on a vertex — just absent. Useful
|
|
30
|
+
* for building tabular output where missing values become
|
|
31
|
+
* empty cells.
|
|
32
|
+
*/
|
|
33
|
+
"projectionFilter": {
|
|
34
|
+
"attributes": ["name", "type", "hostname", "k8s_namespace", "k8s_status"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# 17-filter-lucene (TAS)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Demonstrate the `LUCENE` filter, which provides full-text search using Lucene query syntax against indexed vertex attributes.
|
|
6
|
+
|
|
7
|
+
## Query Construction
|
|
8
|
+
|
|
9
|
+
Uses `LUCENE` with `query: "name:Kubernetes*"` — Lucene query syntax searching for vertices whose `name` attribute starts with "Kubernetes".
|
|
10
|
+
|
|
11
|
+
## API Surface Exercised
|
|
12
|
+
|
|
13
|
+
- **Filter**: `LUCENE` with `query` string (Lucene query syntax)
|
|
14
|
+
|
|
15
|
+
## Expected Output
|
|
16
|
+
|
|
17
|
+
**This query is marked as `expectedFailure: true`** because Lucene indexing is not enabled on all tenants — when it isn't, the server responds with HTTP 400.
|
|
18
|
+
|
|
19
|
+
When Lucene is available, the query would return AGENT and AGENT_CONNECTION vertices with names like "Kubernetes Agent".
|
|
20
|
+
|
|
21
|
+
## What the Results Tell You
|
|
22
|
+
|
|
23
|
+
The `LUCENE` filter is a powerful full-text search capability but depends on tenant-level configuration. When available, it supports the full Lucene query syntax including:
|
|
24
|
+
- Field-specific queries: `name:value`
|
|
25
|
+
- Wildcards: `name:Kubernetes*`
|
|
26
|
+
- Boolean: `name:Kubernetes* AND type:AGENT`
|
|
27
|
+
- Range queries: `startTime:[2024-01-01 TO 2024-12-31]`
|
|
28
|
+
|
|
29
|
+
If Lucene is not configured, fall back to `ATTRIBUTE` filters with `MATCHES` operator for regex-based searching.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* `LUCENE` filter — full-text search using Lucene query syntax
|
|
3
|
+
* against indexed vertex attributes. Powerful (wildcards, fielded
|
|
4
|
+
* queries, range queries, boolean composition) but tenant-config-
|
|
5
|
+
* dependent: Lucene indexing is NOT enabled on every tenant.
|
|
6
|
+
*
|
|
7
|
+
* **TENANT-DEPENDENT**: this query is marked `expectedFailure: true`
|
|
8
|
+
* in its TMD because tenants without Lucene indexing return HTTP
|
|
9
|
+
* 400. Always verify capability first via `discovery_capabilities`
|
|
10
|
+
* (when M3.8 ships) before authoring a LUCENE-based query as the
|
|
11
|
+
* canonical answer; if Lucene's off, fall back to ATTRIBUTE +
|
|
12
|
+
* MATCHES.
|
|
13
|
+
*
|
|
14
|
+
* Lucene syntax cheatsheet:
|
|
15
|
+
* field:value — fielded match
|
|
16
|
+
* field:value* — wildcard (multi-char)
|
|
17
|
+
* field:value? — wildcard (single-char)
|
|
18
|
+
* field:[a TO z] — range
|
|
19
|
+
* foo AND bar — boolean
|
|
20
|
+
* "phrase match" — phrase
|
|
21
|
+
* field:val OR field:other
|
|
22
|
+
*/
|
|
23
|
+
{
|
|
24
|
+
/*
|
|
25
|
+
* Single LUCENE filter at the root. The `query` is a Lucene
|
|
26
|
+
* query string — `name:Kubernetes*` matches vertices whose
|
|
27
|
+
* `name` attribute starts with "Kubernetes".
|
|
28
|
+
*
|
|
29
|
+
* Equivalent ATTRIBUTE+MATCHES fallback (if LUCENE is off):
|
|
30
|
+
* ATTRIBUTE { name: "name", operator: MATCHES,
|
|
31
|
+
* values: ["^Kubernetes.*"], caseInsensitive: false }
|
|
32
|
+
*/
|
|
33
|
+
"filter": {
|
|
34
|
+
"op": "LUCENE",
|
|
35
|
+
"query": "name:Kubernetes*"
|
|
36
|
+
},
|
|
37
|
+
"limit": 20,
|
|
38
|
+
"projection": "DETAILED"
|
|
39
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# 18-filter-variable-reuse (TAS)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Demonstrate `VARIABLE` — TAS query variables that allow defining reusable sub-queries by name. This is useful when the same vertex set is needed in multiple places within a complex query.
|
|
6
|
+
|
|
7
|
+
## Query Construction
|
|
8
|
+
|
|
9
|
+
1. **Variable declaration**: The top-level `variables` array defines a variable named `"k8s_hosts"` with its `input` filter (ATTRIBUTE type IN HOST)
|
|
10
|
+
2. **Variable reference**: The main `filter` uses `VARIABLE` with `name: "k8s_hosts"` to reference the pre-defined set
|
|
11
|
+
3. **Traversal**: The variable result is fed into a TRAVERSE (1 hop, any direction)
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"variables": [
|
|
16
|
+
{
|
|
17
|
+
"name": "k8s_hosts",
|
|
18
|
+
"input": { "op": "ATTRIBUTE", "expressions": [...] }
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"filter": {
|
|
22
|
+
"op": "TRAVERSE",
|
|
23
|
+
"input": { "op": "VARIABLE", "name": "k8s_hosts" },
|
|
24
|
+
"traverse": [{ "direction": "ANY", "repeat": 1 }],
|
|
25
|
+
"includeInput": true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## API Surface Exercised
|
|
31
|
+
|
|
32
|
+
- **TasQuery.variables**: Array of `{ name, input }` variable definitions
|
|
33
|
+
- **Filter**: `VARIABLE` with `name` reference
|
|
34
|
+
- **Composition**: VARIABLE as input to TRAVERSE
|
|
35
|
+
|
|
36
|
+
## Expected Output
|
|
37
|
+
|
|
38
|
+
Returns ~50 vertices: the 3 HOST vertices plus all their 1-hop neighbors (agents, k8s pods/containers connected to those hosts).
|
|
39
|
+
|
|
40
|
+
## What the Results Tell You
|
|
41
|
+
|
|
42
|
+
Variables serve two purposes:
|
|
43
|
+
1. **Code reuse**: Define a complex filter once, reference it multiple times (e.g., in a JOIN's left and right inputs)
|
|
44
|
+
2. **Readability**: Named sub-queries make complex queries easier to understand
|
|
45
|
+
|
|
46
|
+
Variables are evaluated once and their result is cached for the duration of the query.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* `variables` + `VARIABLE` op — name a sub-filter once, reference
|
|
3
|
+
* it multiple times in the same query. Useful when a complex seed
|
|
4
|
+
* filter needs to participate in multiple places (multi-hop
|
|
5
|
+
* traversal with the same seed at each hop, or comparing two
|
|
6
|
+
* filters that share a base).
|
|
7
|
+
*
|
|
8
|
+
* Pattern shown here is minimal: define `k8s_hosts` once, reference
|
|
9
|
+
* once via VARIABLE. The win is bigger when the variable is used
|
|
10
|
+
* 2+ times — server evaluates the named filter ONCE.
|
|
11
|
+
*/
|
|
12
|
+
{
|
|
13
|
+
/*
|
|
14
|
+
* `variables` is a top-level field (sibling of `filter`).
|
|
15
|
+
* Each entry has a `name` and an `input` (the filter to bind).
|
|
16
|
+
* The bound name is then referenced via `{op:'VARIABLE', name}`
|
|
17
|
+
* anywhere a filter is expected.
|
|
18
|
+
*/
|
|
19
|
+
"variables": [
|
|
20
|
+
{
|
|
21
|
+
"name": "k8s_hosts",
|
|
22
|
+
"input": {
|
|
23
|
+
"op": "ATTRIBUTE",
|
|
24
|
+
"expressions": [
|
|
25
|
+
{
|
|
26
|
+
"name": "type",
|
|
27
|
+
"values": ["HOST"],
|
|
28
|
+
"operator": "IN"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"filter": {
|
|
35
|
+
"op": "TRAVERSE",
|
|
36
|
+
/*
|
|
37
|
+
* `VARIABLE` is a leaf op (no `input`, no children) — it
|
|
38
|
+
* just dereferences the named entry from `variables`. Server
|
|
39
|
+
* substitutes the bound filter at execution time.
|
|
40
|
+
*/
|
|
41
|
+
"input": {
|
|
42
|
+
"op": "VARIABLE",
|
|
43
|
+
"name": "k8s_hosts"
|
|
44
|
+
},
|
|
45
|
+
"traverse": [
|
|
46
|
+
{
|
|
47
|
+
"direction": "ANY",
|
|
48
|
+
"repeat": 1
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"includeInput": true
|
|
52
|
+
},
|
|
53
|
+
"limit": 50,
|
|
54
|
+
"projection": "DETAILED"
|
|
55
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# 19-filter-order-statefilter (TAS)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Demonstrate the `order` and `includeStatus` query options, which control result sorting and include alert/monitoring status on each vertex.
|
|
6
|
+
|
|
7
|
+
## Query Construction
|
|
8
|
+
|
|
9
|
+
Queries all AGENT vertices with:
|
|
10
|
+
- **order**: Sort by `name` ascending, case-insensitive
|
|
11
|
+
- **includeStatus**: `true` — include the vertex's monitoring status (alert level, staleness, etc.)
|
|
12
|
+
|
|
13
|
+
The `order` field is an array of sort specifications, each with:
|
|
14
|
+
- `name` — attribute to sort by
|
|
15
|
+
- `desc` — descending if true
|
|
16
|
+
- `caseInsensitive` — ignore case in string comparisons
|
|
17
|
+
|
|
18
|
+
## API Surface Exercised
|
|
19
|
+
|
|
20
|
+
- **TasQuery.order**: Array of `{ name, desc, caseInsensitive }` sort specs
|
|
21
|
+
- **TasQuery.includeStatus**: Boolean to include vertex monitoring state
|
|
22
|
+
- **Filter**: `ATTRIBUTE` with `IN` operator
|
|
23
|
+
|
|
24
|
+
## Expected Output
|
|
25
|
+
|
|
26
|
+
Returns up to 20 AGENT vertices sorted alphabetically by name. Each vertex may include additional status-related attributes showing whether the agent is active, its alert level, and when it last reported data.
|
|
27
|
+
|
|
28
|
+
Typical agents include:
|
|
29
|
+
- Database-monitoring agents (MySQL / Postgres / etc. APM IAs)
|
|
30
|
+
- Kubernetes / Prometheus agents in any reporting clusters
|
|
31
|
+
- Infrastructure agents
|
|
32
|
+
- Experience Collector agents
|
|
33
|
+
|
|
34
|
+
## What the Results Tell You
|
|
35
|
+
|
|
36
|
+
The `order` option is critical for paginated UIs — combined with `limit` and `offset`, it enables consistent pagination over large result sets. The `includeStatus` flag adds real-time monitoring context to topology queries, allowing UI dashboards to show not just what exists but what's healthy.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Sort + status-include — two query-envelope features:
|
|
3
|
+
*
|
|
4
|
+
* - `order: [...]` sorts the result. Required for paginated UIs
|
|
5
|
+
* that combine `limit` + `offset` — without `order`, the server
|
|
6
|
+
* can return rows in any order and pagination becomes
|
|
7
|
+
* nondeterministic.
|
|
8
|
+
* - `includeStatus: true` enriches each vertex with monitoring
|
|
9
|
+
* state (alert level, staleness, last-reported timestamp, etc).
|
|
10
|
+
* Adds bytes — only set when you need the health signal.
|
|
11
|
+
*
|
|
12
|
+
* Both are sibling fields of `filter` at the top of the query.
|
|
13
|
+
*/
|
|
14
|
+
{
|
|
15
|
+
"filter": {
|
|
16
|
+
"op": "ATTRIBUTE",
|
|
17
|
+
"expressions": [
|
|
18
|
+
{
|
|
19
|
+
"name": "type",
|
|
20
|
+
"values": ["AGENT"],
|
|
21
|
+
"operator": "IN"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
/*
|
|
26
|
+
* `order` is an ARRAY of sort specs (multi-column sort).
|
|
27
|
+
* Each spec:
|
|
28
|
+
* name: attribute name
|
|
29
|
+
* desc: descending? (default false = ascending)
|
|
30
|
+
* caseInsensitive: ignore case for string sorts (default false)
|
|
31
|
+
*
|
|
32
|
+
* Bake `order` into any query you intend to paginate. Without it,
|
|
33
|
+
* `limit`+`offset` results vary across requests.
|
|
34
|
+
*/
|
|
35
|
+
"order": [
|
|
36
|
+
{
|
|
37
|
+
"name": "name",
|
|
38
|
+
"desc": false,
|
|
39
|
+
"caseInsensitive": true
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
/*
|
|
43
|
+
* `includeStatus` adds monitoring-state attributes to each
|
|
44
|
+
* returned vertex (alert level, staleness, etc). Cost: extra
|
|
45
|
+
* bytes per vertex. Off by default; set true when you need
|
|
46
|
+
* "is this entity healthy / fresh?".
|
|
47
|
+
*/
|
|
48
|
+
"includeStatus": true,
|
|
49
|
+
"limit": 20,
|
|
50
|
+
"projection": "DETAILED"
|
|
51
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 20-nassql-from-metadata-basic (NASSQL)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Demonstrate the simplest NASSQL pipeline: `FROM_METADATA` with `ALL` specifier, aggregated with `COUNT`.
|
|
6
|
+
|
|
7
|
+
## Query Construction
|
|
8
|
+
|
|
9
|
+
Three-step pipeline:
|
|
10
|
+
1. `FROM_METADATA` with `{ op: "ALL" }` specifier — loads all metric metadata rows
|
|
11
|
+
2. `COUNT` with `as: "total"` — counts all rows into a single number
|
|
12
|
+
3. `KEEP` with `["total"]` — retains only the count column
|
|
13
|
+
|
|
14
|
+
## API Surface Exercised
|
|
15
|
+
|
|
16
|
+
- **FROM_METADATA**: Source operation loading metric metadata (not data values)
|
|
17
|
+
- **COUNT**: Aggregation operation
|
|
18
|
+
- **KEEP**: Column selection (must be the last operation in the pipeline)
|
|
19
|
+
|
|
20
|
+
## Expected Output
|
|
21
|
+
|
|
22
|
+
A single data row: `[["total"], [N]]` where N is the total number of metrics on the tenant. The number depends on retention, data volume, and what's reporting — small lab tenants may show tens of thousands; busy production tenants can sit in the millions.
|
|
23
|
+
|
|
24
|
+
## What the Results Tell You
|
|
25
|
+
|
|
26
|
+
This is the NASSQL equivalent of `SELECT COUNT(*) FROM metric_metadata`. The `FROM_METADATA` operation returns one row per registered metric. The `COUNT` aggregation collapses all rows into a single count.
|
|
27
|
+
|
|
28
|
+
Key pipeline rule: `KEEP` must always be the last operation (the API returns HTTP 400 if anything follows KEEP).
|