# Grafana datasources - Smart City Digital Twin Martinique
apiVersion: 1

datasources:
  # InfluxDB v2 (time-series IoT data)
  - name: InfluxDB-v2
    type: influxdb
    access: proxy
    url: http://smart-city-influxdb:8086
    isDefault: true
    editable: true
    jsonData:
      version: Flux
      organization: digitribe
      defaultBucket: smartcity
      tlsSkipVerify: true
    secureJsonData:
      token: my-super-token

  # FIWARE Orion-LD
  - name: FIWARE Orion
    type: grafana-simple-json-datasource
    access: proxy
    url: http://fiware-gis-quickstart-orion-1:1026
    editable: true
    jsonData:
      queryURLTemplate: "/ngsi-ld/v1/entities?type={{type}}"
      method: GET

  # GeoServer WMS
  - name: GeoServer WMS
    type: grafana-simple-json-datasource
    access: proxy
    url: http://docker-geoserver-1:8080/geoserver
    editable: true
    jsonData:
      queryURLTemplate: "/geoserver/wfs?service=WFS&version=2.0&request=GetFeature&typeName={{type}}"
      method: GET

  # FROST-Server
  - name: FROST-Server
    type: grafana-simple-json-datasource
    access: proxy
    url: http://frost-api-8090:8090/FROST-Server/v1.1
    editable: true
    jsonData:
      queryURLTemplate: "/Things?$top=1"
      method: GET
