Skip to content

Return data from victoria metrics

In #1 (comment 2918960) we have agreed not to return timeseries from Victoria Metrics directly in the server status. Instead the idea is to provide a ref link to the actual data that the client can request on a needed basis.

Ex:

"metrics": [
  "network_weight": {
    "ref": "/api/metrics/network_weight/74A910646BCEEFBCD2E874FC1DC997430F968145"
  },
  "network_fraction": {
    "ref": "/api/metrics/network_fraction/74A910646BCEEFBCD2E874FC1DC997430F968145"
  },
  ...
]

When the client makes a request to the url: "/api/metrics/network_weight/74A910646BCEEFBCD2E874FC1DC997430F968145" the returned response could be:

"metrics": [
{
  "network_weight": {
    "ref": "/api/metrics/network_weight/74A910646BCEEFBCD2E874FC1DC997430F968145"
  },
  "data": { 
      "resultType":"matrix",
      "result":[ 
        {
          "metric": {
            "__name__":"network_weight",
            "fingerprint":"74A910646BCEEFBCD2E874FC1DC997430F968145",
            "nickname":"longclaw"
          },
          "values":[[1686963748.688,"20"],[1686964048.688,"20"],[1687028548.688,"20"],[1687028848.688,"20"],[1687093348.688,"20"],[1687093648.688,"20"],[1687158448.688,"20"],[1687223248.688,"20"],[1687288048.688,"20"],[1687352848.688,"20"],[1687417648.688,"20"],[1687482448.688,"20"],[1687547248.688,"20"],[1687612048.688,"20"],[1687676848.688,"20"],[1687741648.688,"20"],[1687806448.688,"20"],[1687871248.688,"20"],[1687936048.688,"20"],[1688000848.688,"20"],[1688065648.688,"20"],[1688086948.688,"20"],[1688151748.688,"20"],[1688216548.688,"20"],[1688281348.688,"20"],[1688346148.688,"20"]]
        }
      ]
      "status": "success",
    }
  },
...
]

\cc @gk @mattrighetti @juga

Edited by Hiro