grafana / influxdb-flux-datasource

Grafana datasource plugin for Flux (InfluxDB)
Apache License 2.0
51 stars 21 forks source link

No data for panels with Flux datasource in dashboard JSON model #90

Closed M0rdecay closed 4 years ago

M0rdecay commented 4 years ago

After creating several panels using the Flux plugin, I noticed that they did not display correctly in the dashboard JSON model:

    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      }

This breaks the transfer of dashboards between grafana instances.

But the panel JSON model is displayed correctly:

{
  "datasource": "$Flux",
  "cacheTimeout": null,
  "description": ".........................",
  "gridPos": {
    "h": 2,
    "w": 4,
    "x": 4,
    "y": 6
  },
  "hideTimeOverride": true,
  "id": 49,
  "links": [],
  "maxPerRow": 2,
  "options": {
    "graphMode": "none",
    "colorMode": "background",
    "justifyMode": "auto",
    "fieldOptions": {
      "values": false,
      "calcs": [
        "sum"
      ],
      "defaults": {
        "thresholds": {
          "mode": "absolute",
          "steps": [
            {
              "color": "blue",
              "value": null
            },
            {
              "color": "green",
              "value": 0
            },
            {
              "color": "yellow",
              "value": 0.1
            }
          ]
        },
        "mappings": [
          {
            "id": 0,
            "op": "=",
            "text": "No Data",
            "type": 1,
            "value": "null"
          },
          {
            "from": "0.1",
            "id": 1,
            "op": "=",
            "text": "Needs Check",
            "to": "9999",
            "type": 2,
            "value": "0"
          },
          {
            "id": 2,
            "op": "=",
            "text": "OK",
            "type": 1,
            "value": "0"
          }
        ],
        "links": [
          {
            "targetBlank": true,
            "title": "................",
            "url": "......."
          }
        ],
        "nullValueMode": "connected",
        "title": "Errors:",
        "unit": "none"
      },
      "overrides": []
    },
    "orientation": "vertical"
  },
  "pluginVersion": "6.7.2",
  "repeatDirection": "h",
  "targets": [
    {
      "query": "errs = from(bucket: \"$database/$ret_policy\")\n  ..........",
      "refId": "A"
    }
  ],
  "timeFrom": null,
  "timeShift": "$coll_interval",
  "title": "",
  "type": "stat"
}

Please let me know if the problem is not related to the Flux plugin - I will open issue on grafana.

M0rdecay commented 4 years ago

I apologize for the concern, the problem was on our side.