# ------------------------------------------------------------
# Copyright © 2026/2027 Dr. Mohammad Alja'afreh. All rights reserved.
# PSUT IoT Engineering Learning Platform
# ------------------------------------------------------------
# ---- Grafana data source: InfluxDB 2 with the Flux query language
# Grafana reads this file at start-up. $INFLUX_TOKEN comes from the environment.
apiVersion: 1
datasources:
  - name: InfluxDB greenhouse
    uid: influx-greenhouse            # dashboards refer to the data source by this uid
    type: influxdb
    access: proxy                     # Grafana's server queries InfluxDB, not the browser
    url: http://localhost:8086
    isDefault: true
    jsonData:
      version: Flux
      organization: psut
      defaultBucket: greenhouse
    secureJsonData:
      token: $INFLUX_TOKEN            # stored encrypted, never sent to the browser
