Cannot Make Dashboard Public

  • What Grafana version and what operating system are you using?

Grafana v9.1.6

  • What are you trying to achieve?

To make my dashboard public

  • How are you trying to achieve it?

Though the share option

  • What happened?

I get the following error

  • What did you expect to happen?

  • Can you copy/paste the configuration(s) that you are having problems with?

These are variables I have:

  "templating": {
    "list": [
      {
        "current": {
          "selected": true,
          "text": [
            "Prometheus"
          ],
          "value": [
            "Prometheus"
          ]
        },
        "hide": 0,
        "includeAll": false,
        "multi": true,
        "name": "datasource",
        "options": [],
        "query": "prometheus",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {
          "selected": true,
          "text": "fid-0",
          "value": "fid-0"
        },
        "definition": "label_values(ldap_monitor_starttime,instance)",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "node",
        "options": [],
        "query": {
          "query": "label_values(ldap_monitor_starttime,instance)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-30m",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "FID Dashboard",
  "uid": "RAyRjySnz1",
  "version": 6,
  "weekStart": ""
}

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

The ERROR says the dashboard contains template variables. Can someone assist me on solving this

Not sure if you read this docu?

Hi @yosiasz thank you for your response, I went through the document, I noticed that certain public dashboards still have template variables in them. Is there a way I can achieve what I need by having variables by any chance? Or is there something equivalent to the variables?

1 Like

what are the sources of the template variables?

@yosiasz The datasource (if that is what you mean ) is prometheus and the data is coming from an application which is clustered (with multiple nodes)

"templating": {
      "list": [
        {
          "description": null,
          "error": null,
          "hide": 0,
          "includeAll": false,
          "label": null,
          "multi": false,
          "name": "datasource",
          "options": [],
          "query": "prometheus",
          "refresh": 1,
          "regex": "",
          "skipUrlSync": false,
          "type": "datasource"
        },
        {
          "datasource": "${datasource}",
          "allValue": null,
          "definition": "label_values(ldap_monitor_starttime,instance)",
          "description": null,
          "error": null,
          "hide": 0,
          "includeAll": false,
          "label": null,
          "multi": true,
          "name": "node",
          "options": [],
          "query": {
            "query": "label_values(ldap_monitor_starttime,instance)",
            "refId": "StandardVariableQuery"
          },
          "refresh": 1,
          "regex": "",
          "skipUrlSync": false,
          "sort": 0,
          "type": "query"
        }
      ]
    },
    "time": {
      "from": "now-30m",
      "to": "now"
    },
    "timepicker": {},
    "timezone": "",
    "title": "FID Dashboard",
    "uid": "RAyRjySnz1",
    "version": 1
  }

Is prometheus internal on prem or cloud and public ip?

@yosiasz The entire setup (along with the applications) in on Kubernetes (EKS)

@yosiasz any other information you can share regarding my requirement?

Oops got lost. So kubernetes does not mean it is public

@yosiasz yes if you are asking weather the services are public? then they are not.

So I found few dashboards online that have variables and are still public how do those work ?

Is there a way I can make my dashboard public as well without removing any variables?

Which dashboards

You can create those variables with static data source using inifinity for example

@yosiasz Like for example the dashboards from this website

And also node exporter dashboard

Can you provide some more info on this static datasource usage?

My requirement is to make the current dashboard public , as we will be offering our product as a saas offering so when some deployed our services helm (whihc has prometheus and grafana with datasource ) ad import dashboard , they should be readily be able to use the grafana dashboard, but these template variables are not allowing that

yes those are from grafana itself, so, unlike your scenario, they probably have exposed their data sources to be publicly accessed exclusively from the specific server running grafana (most probably by specific ip address(es) for play.grafana.org, what is commonly known as whitelisting)

For static data sources see (inline csv for example does not involve any server cause it is inline :slight_smile: )

@yosiasz another question, Is there any other way to get the drop down lists that the template variables provide by not using the variables? Like any configuration change that can be added to the dashboard json that can get me those?

Not that I know of. Unless maybe you go outside the stock grafana dashboards