Grafana + SQLite + World Map not showing points

Hello there, I am very new to Grafana and just started configuring it 6 hours ago. I am trying to display geohash points to the world map panel from a SQLite database. I am using the grafana 7.5.5-ubuntu docker image on a Ubuntu 20.04.02 LTS VM. The SQLite plugin I am using is the fr-ser/grafana-sqlite-datasource version 1.2.1 and the world map panel plugin is version 0.3.2. I’ve set bind mounts for the container to access the database file on the host and did SQLite query from grafana and it works, both time and the geohash are showing in the query result. I just can’t get it to show on the world map.
Here is the result from query inspector.



Here is the JSON config of the panel.

{
  "circleMaxSize": "1",
  "circleMinSize": "1",
  "colors": [
    "rgba(245, 54, 54, 0.9)",
    "rgba(237, 129, 40, 0.89)",
    "rgba(50, 172, 45, 0.97)"
  ],
  "decimals": 0,
  "esGeoPoint": "geohash",
  "esLocationName": "",
  "esMetric": "",
  "fieldConfig": {
    "defaults": {},
    "overrides": []
  },
  "gridPos": {
    "h": 18,
    "w": 12,
    "x": 0,
    "y": 0
  },
  "hideEmpty": false,
  "hideZero": false,
  "id": 23763571993,
  "initialZoom": 1,
  "locationData": "geohash",
  "mapCenter": "(0°, 0°)",
  "mapCenterLatitude": 0,
  "mapCenterLongitude": 0,
  "maxDataPoints": 1,
  "mouseWheelZoom": true,
  "pluginVersion": "7.5.5",
  "showLegend": true,
  "stickyLabels": false,
  "tableQueryOptions": {
    "geohashField": "geohash",
    "latitudeField": "latitude",
    "longitudeField": "longitude",
    "metricField": "metric",
    "queryType": "geohash"
  },
  "targets": [
    {
      "hide": false,
      "queryText": "SELECT time, geohash FROM peer_list ORDER BY time ASC",
      "queryType": "table",
      "rawQueryText": "SELECT time, geohash FROM peer_list ORDER BY time ASC",
      "refId": "A",
      "timeColumns": [
        "time",
        "ts"
      ]
    }
  ],
  "thresholds": "0,10",
  "title": "Panel Title",
  "type": "grafana-worldmap-panel",
  "unitPlural": "",
  "unitSingle": "",
  "valueName": "total",
  "datasource": null
}

I fixed it. It turns out it needs the metric column.

2 Likes

This topic was automatically closed after 365 days. New replies are no longer allowed.