ves-io-schema-graph-connectivity-CustomAPI-Query
Examples of performing graph_connectivity CustomAPI Query
Usecase:
Get graph connectivity data
Request:
Request using vesctl:
vesctl request rpc graph_connectivity.CustomAPI.Query -i request.yaml --uri /public/namespaces/system/graph/connectivity --http-method POST
where file request.yaml has following contents:
endTime: "1580407200"
fieldSelector:
edge:
metric:
types:
- EDGE_DATA_PLANE_CONNECTION_STATUS
- EDGE_OUT_THROUGHPUT
node:
metric:
types:
- NODE_DATA_PLANE_CONNECTION_STATUS
- NODE_OUT_THROUGHPUT
namespace: system
startTime: "1580403600"
vesctl yaml response:
edges:
- dstId:
site: site2
metric:
- type: EDGE_DATA_PLANE_CONNECTION_STATUS
value:
anomaly: []
confidenceLowerBound: []
confidenceUpperBound: []
healthscore: []
raw:
- timestamp: 1580407200
value: "1"
trend: []
- type: EDGE_OUT_THROUGHPUT
value:
anomaly: []
confidenceLowerBound: []
confidenceUpperBound: []
healthscore: []
raw:
- timestamp: 1580407200
value: "7.587077099800346"
trend: []
srcId:
site: site1
nodes:
- id:
site: site1
instances: []
interfaces: []
metric:
- type: NODE_DATA_PLANE_CONNECTION_STATUS
value:
anomaly: []
confidenceLowerBound: []
confidenceUpperBound: []
healthscore: []
raw:
- timestamp: 1580407200
value: "1"
trend: []
- type: NODE_OUT_THROUGHPUT
value:
anomaly: []
confidenceLowerBound: []
confidenceUpperBound: []
healthscore: []
raw:
- timestamp: 1580407200
value: "7.587077099800346"
trend: []
- id:
site: site2
instances: []
interfaces: []
metric:
- type: NODE_DATA_PLANE_CONNECTION_STATUS
value:
anomaly: []
confidenceLowerBound: []
confidenceUpperBound: []
healthscore: []
raw:
- timestamp: 1580407200
value: "1"
trend: []
- type: NODE_OUT_THROUGHPUT
value:
anomaly: []
confidenceLowerBound: []
confidenceUpperBound: []
healthscore: []
raw:
- timestamp: 1580407200
value: "7.587077099800346"
trend: []
Request using curl:
curl -X 'POST' -d '{"namespace":"system","field_selector":{"node":{"metric":{"types":["NODE_DATA_PLANE_CONNECTION_STATUS","NODE_OUT_THROUGHPUT"]}},"edge":{"metric":{"types":["EDGE_DATA_PLANE_CONNECTION_STATUS","EDGE_OUT_THROUGHPUT"]}}},"start_time":"1580403600","end_time":"1580407200"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build2547058132_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/data/namespaces/system/graph/connectivity'
curl response:
HTTP/1.1 200 OK
Content-Type: application/json
Date: Fri, 08 Sep 2023 16:02:10 GMT
Vary: Accept-Encoding
X-Volterra-Request-Fields-Deprecated: field_selector.edge.metric.types.#:7,field_selector.edge.metric.types.#:8,field_selector.edge.metric.types.#:EDGE_ARES_CONNECTION_STATUS,field_selector.edge.metric.types.#:EDGE_CONNECTION_STATUS,field_selector.node.metric.types.#:8,field_selector.node.metric.types.#:9,field_selector.node.metric.types.#:NODE_ARES_CONNECTION_STATUS,field_selector.node.metric.types.#:NODE_CONNECTION_STATUS
X-Volterra-Response-Fields-Deprecated: edges.#.metric.#.type:7,edges.#.metric.#.type:8,edges.#.metric.#.type:EDGE_ARES_CONNECTION_STATUS,edges.#.metric.#.type:EDGE_CONNECTION_STATUS,nodes.#.metric.#.type:8,nodes.#.metric.#.type:9,nodes.#.metric.#.type:NODE_ARES_CONNECTION_STATUS,nodes.#.metric.#.type:NODE_CONNECTION_STATUS
{
"nodes": [
{
"id": {
"site": "site1",
"site_type": "INVALID"
},
"metric": [
{
"type": "NODE_DATA_PLANE_CONNECTION_STATUS",
"value": {
"raw": [
{
"timestamp": 1580407200,
"value": "1",
"trend_value": null
}
],
"confidence_upper_bound": [
],
"confidence_lower_bound": [
],
"anomaly": [
],
"trend": [
],
"healthscore": [
]
}
},
{
"type": "NODE_OUT_THROUGHPUT",
"value": {
"raw": [
{
"timestamp": 1580407200,
"value": "7.587077099800346",
"trend_value": null
}
],
"confidence_upper_bound": [
],
"confidence_lower_bound": [
],
"anomaly": [
],
"trend": [
],
"healthscore": [
]
}
}
],
"interfaces": [
],
"instances": [
],
"healthscore": null
},
{
"id": {
"site": "site2",
"site_type": "INVALID"
},
"metric": [
{
"type": "NODE_DATA_PLANE_CONNECTION_STATUS",
"value": {
"raw": [
{
"timestamp": 1580407200,
"value": "1",
"trend_value": null
}
],
"confidence_upper_bound": [
],
"confidence_lower_bound": [
],
"anomaly": [
],
"trend": [
],
"healthscore": [
]
}
},
{
"type": "NODE_OUT_THROUGHPUT",
"value": {
"raw": [
{
"timestamp": 1580407200,
"value": "7.587077099800346",
"trend_value": null
}
],
"confidence_upper_bound": [
],
"confidence_lower_bound": [
],
"anomaly": [
],
"trend": [
],
"healthscore": [
]
}
}
],
"interfaces": [
],
"instances": [
],
"healthscore": null
}
],
"edges": [
{
"src_id": {
"site": "site1",
"site_type": "INVALID"
},
"dst_id": {
"site": "site2",
"site_type": "INVALID"
},
"metric": [
{
"type": "EDGE_DATA_PLANE_CONNECTION_STATUS",
"value": {
"raw": [
{
"timestamp": 1580407200,
"value": "1",
"trend_value": null
}
],
"confidence_upper_bound": [
],
"confidence_lower_bound": [
],
"anomaly": [
],
"trend": [
],
"healthscore": [
]
}
},
{
"type": "EDGE_OUT_THROUGHPUT",
"value": {
"raw": [
{
"timestamp": 1580407200,
"value": "7.587077099800346",
"trend_value": null
}
],
"confidence_upper_bound": [
],
"confidence_lower_bound": [
],
"anomaly": [
],
"trend": [
],
"healthscore": [
]
}
}
],
"healthscore": null
}
]
}