M.K.S
M.K.S

Reputation: 89

Grafana Infinity Datasource

How to allow all hosts for infinity datasource in grafana. my json for config map of datasource is

kubectl describe configmap grafana-app-config-datasource -n grafana
Name:         grafana-app-config-datasource
Namespace:    grafana
Labels:       <none>
Annotations:  <none>

Data
====
influxdb-datasource.yml:
----
# config file version
apiVersion: 1

datasources:
  - name: infuxdb
    type: "influxdb"
    access: "proxy"
    url: "http://influxdb2-abcd-service:8085"
    editable: true
    secureJsonData:
      token: "7hgdfhgfhghghghMMJkbkylrGlwfXTS"
    jsonData:
      version: Flux
      organization: "fgfgfg450"
      defaultBucket: xyz-bucket
      tlsSkipVerify: true
      timeInterval: "1m"
  - uid: "Z_L7ZejIz"
    orgId: 1
    name: "Infinity"
    type: "yesoreyeram-infinity-datasource"
    url: ""
    basicAuth: false
    basicAuthUser: ""
    isDefault: false
    jsonData:
      auth_method: "bearerToken"
      global_queries: []
      allowedHosts: "*"
      oauthPassThru: false
    version: 2
    readOnly: false
    secureJsonData:
      bearerToken: "hhjy-hfjfhfghhfgid6ZzDXlhjhfjhfjhfjhfjfhjwrw"

Events:  <none>

I think its not accepting allowedHosts: "*" how to allow all hosts, I am getting error datasource is missing allowed host/URLs, Configure it in datasource settings page for enhanced security

Upvotes: 0

Views: 526

Answers (1)

Nir Levy
Nir Levy

Reputation: 4740

I am not sure what version of the plugin you are using, but on the latest version the allowedHosts setting is optional so you should be able to just omit it or add several relevant options as per the documentation.

Upvotes: 0

Related Questions