Templating, multi value problem

Hi, there seems to be a problem using multi value option of Templating.
I’m using Grafana-4.4.1-1.x86_64.rpm

We have to select more than one selection to get data. If we select only one, there are no results but we know that there are since it works well without the multi value option selected.

Regards,

Following are both JSON.

JSON Templating with multi value:

{
  "annotations": {
    "list": []
  },
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "hideControls": false,
  "id": 9,
  "links": [],
  "refresh": false,
  "rows": [
    {
      "collapse": false,
      "height": "300px",
      "panels": [
        {
          "aliasColors": {},
          "annotate": {
            "enable": false
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": null,
          "editable": true,
          "fill": 2,
          "grid": {
            "max": null,
            "min": null
          },
          "id": 12,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "loadingEditor": false,
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "resolution": 100,
          "scale": 1,
          "seriesOverrides": [],
          "spaceLength": 10,
          "span": 6,
          "stack": true,
          "steppedLine": false,
          "targets": [
            {
              "refId": "A",
              "target": "aliasByNode(perSecond(servers.$Serveur.disk.dm-*.disk_ops.*), 1, 3)"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Disks Ops (Physical Local disks) / sec",
          "tooltip": {
            "msResolution": false,
            "query_as_alias": true,
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "none",
              "label": "",
              "show": true
            },
            {
              "format": "none",
              "show": true
            }
          ],
          "zerofill": true
        }
      ],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Disks",
      "titleSize": "h6"
    },
    {
      "collapse": false,
      "height": 250,
      "panels": [],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Dashboard Row",
      "titleSize": "h6"
    }
  ],
  "schemaVersion": 14,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "text": "lgra543p + lsup543p",
          "value": [
            "lgra543p",
            "lsup543p"
          ]
        },
        "datasource": "Graphite-reseau",
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": true,
        "name": "Serveur",
        "options": [],
        "query": "servers.*",
        "refresh": 2,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "text": "dm-0",
          "value": "dm-0"
        },
        "datasource": "Graphite-reseau",
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": true,
        "name": "Disk",
        "options": [
          {
            "selected": true,
            "text": "dm-0",
            "value": "dm-0"
          },
          {
            "selected": false,
            "text": "dm-1",
            "value": "dm-1"
          },
          {
            "selected": false,
            "text": "dm-2",
            "value": "dm-2"
          },
          {
            "selected": false,
            "text": "dm-3",
            "value": "dm-3"
          },
          {
            "selected": false,
            "text": "dm-4",
            "value": "dm-4"
          },
          {
            "selected": false,
            "text": "dm-5",
            "value": "dm-5"
          },
          {
            "selected": false,
            "text": "dm-6",
            "value": "dm-6"
          },
          {
            "selected": false,
            "text": "sda",
            "value": "sda"
          },
          {
            "selected": false,
            "text": "sda1",
            "value": "sda1"
          },
          {
            "selected": false,
            "text": "sda2",
            "value": "sda2"
          },
          {
            "selected": false,
            "text": "sdb",
            "value": "sdb"
          }
        ],
        "query": "servers.$Serveur.disk.*",
        "refresh": 0,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {
    "collapse": false,
    "enable": true,
    "notice": false,
    "now": true,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "status": "Stable",
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ],
    "type": "timepicker"
  },
  "timezone": "browser",
  "title": "Analyse globale serveur Linux Rhl7",
  "version": 2
}

JSON Templating without multi value

{
  "annotations": {
    "list": []
  },
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "hideControls": false,
  "id": 9,
  "links": [],
  "refresh": false,
  "rows": [
    {
      "collapse": false,
      "height": "300px",
      "panels": [
        {
          "aliasColors": {},
          "annotate": {
            "enable": false
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": null,
          "editable": true,
          "fill": 2,
          "grid": {
            "max": null,
            "min": null
          },
          "id": 12,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "loadingEditor": false,
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "resolution": 100,
          "scale": 1,
          "seriesOverrides": [],
          "spaceLength": 10,
          "span": 6,
          "stack": true,
          "steppedLine": false,
          "targets": [
            {
              "refId": "A",
              "target": "aliasByNode(perSecond(servers.$Serveur.disk.dm-*.disk_ops.*), 1, 3)"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Disks Ops (Physical Local disks) / sec",
          "tooltip": {
            "msResolution": false,
            "query_as_alias": true,
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "none",
              "label": "",
              "show": true
            },
            {
              "format": "none",
              "show": true
            }
          ],
          "zerofill": true
        }
      ],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Disks",
      "titleSize": "h6"
    },
    {
      "collapse": false,
      "height": 250,
      "panels": [],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Dashboard Row",
      "titleSize": "h6"
    }
  ],
  "schemaVersion": 14,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "text": "lgra543p",
          "value": "lgra543p"
        },
        "datasource": "Graphite-reseau",
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "Serveur",
        "options": [],
        "query": "servers.*",
        "refresh": 2,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "text": "dm-0",
          "value": "dm-0"
        },
        "datasource": "Graphite-reseau",
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": true,
        "name": "Disk",
        "options": [
          {
            "selected": true,
            "text": "dm-0",
            "value": "dm-0"
          },
          {
            "selected": false,
            "text": "dm-1",
            "value": "dm-1"
          },
          {
            "selected": false,
            "text": "dm-2",
            "value": "dm-2"
          },
          {
            "selected": false,
            "text": "dm-3",
            "value": "dm-3"
          },
          {
            "selected": false,
            "text": "dm-4",
            "value": "dm-4"
          },
          {
            "selected": false,
            "text": "dm-5",
            "value": "dm-5"
          },
          {
            "selected": false,
            "text": "dm-6",
            "value": "dm-6"
          },
          {
            "selected": false,
            "text": "sda",
            "value": "sda"
          },
          {
            "selected": false,
            "text": "sda1",
            "value": "sda1"
          },
          {
            "selected": false,
            "text": "sda2",
            "value": "sda2"
          },
          {
            "selected": false,
            "text": "sdb",
            "value": "sdb"
          }
        ],
        "query": "servers.$Serveur.disk.*",
        "refresh": 0,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {
    "collapse": false,
    "enable": true,
    "notice": false,
    "now": true,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "status": "Stable",
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ],
    "type": "timepicker"
  },
  "timezone": "browser",
  "title": "Analyse globale serveur Linux Rhl7",
  "version": 2
}

Its a bug in an older version of graphite that does not handle glob expressions with single value. Can you upgrade graphite?

I don’t see anything strange in the dashboard json. Can you check the raw query that is sent to Graphite and see what value is being substituted in this query:

You can do that by following this guide: How to troubleshoot metric query issues

or if you have Grafana 4.5.0 or later then you can use the query inspector: Using Grafana's Query Inspector to troubleshoot issues

This might be a graphite problem. What version of graphite are you using?

Ref: https://github.com/grafana/grafana/issues/5936

Hi, I also found issue https://github.com/grafana/grafana/issues/7205 but the solution was to go back to older version…

We are presently using graphite-web-0.9.16-1.el7.noarch.rpm. The only one available for redhat is graphite-web-0.9.16-2.el7.noarch.rpm but it does’nt talk about that bug. Do you know if that this version is ok? I will test it anyway.

Thanks again,

Gervais

Hi, as expected, that RPM was too old to and doesn’t work. We will have to build our own rpm to get the latest version of Graphite.

Thank’s again,

Gervais.