Skip to content

Results for queries with multiple series are ignored in some charts.

Summary

Most of our documentation indicates that metrics visualizations should be created from a "Range Query" (docs).

Range queries responses always of the type matrix, which have separate rows of data (sometimes displayed as series). Sometimes only the first row of data is displayed.

Details

Range queries responses always of the type matrix, which should be considered as a series of values in a multidimensional space. Range queries are returned in 2 basic forms:

  1. A single "result" is returned:
{
   "status" : "success",
   "data" : {
      "resultType" : "matrix",
      "result" : [ // single "row"
         {
            "metric" : {},
            "values" : [
               [ 1435781430.781, "1" ],
               [ 1435781445.781, "1" ],
               [ 1435781460.781, "1" ]
            ]
         }
      ]
   }
}
  1. Multiple "results" are returned, with the metric information identifying them:
{
   "status" : "success",
   "data" : {
      "resultType" : "matrix",
      "result" : [ // "rows"
         {
            "metric" : {
               "__name__" : "up",
               "job" : "prometheus",
               "instance" : "localhost:9090"
            },
            "values" : [
               [ 1435781430.781, "1" ], // "columns"
               [ 1435781445.781, "1" ],
               [ 1435781460.781, "1" ]
            ]
         },
         {
            "metric" : {
               "__name__" : "up",
               "job" : "node",
               "instance" : "localhost:9091"
            },
            "values" : [
               [ 1435781430.781, "0" ],
               [ 1435781445.781, "0" ],
               [ 1435781460.781, "1" ]
            ]
         }
      ]
   }
}

Each result should be visualized with all the data it contains, each panel could contain 1-to-many metrics, and each metric 1-to-many row of results:

  • Metric 1
    • Row 1
    • Row 2 ...
  • Metric 2
    • Row 1 ...

Task

We should define how many metrics does each chart support and validate for this. Some charts just ignore the data: