Grafana Integration
Goal: Build Grafana dashboards from your governed warm queries.
Prerequisites
- Grafana instance (self-hosted or cloud)
- JSON API data source plugin installed
- API token from OpenIndustrial
Step 1: Install JSON Data Source
In Grafana:
- Go to Configuration → Data Sources
- Click Add data source
- Search for "JSON API"
- Install if not present
Step 2: Configure Data Source
- Name: OpenIndustrial
- URL:
https://api.openindustrial.co/v1/queries - Auth: Add header
- Header:
Authorization - Value:
Bearer YOUR_TOKEN
- Header:
- Click Save & Test
Step 3: Create Dashboard
- Click + New Dashboard
- Add a panel
- Select your OpenIndustrial data source
- Enter query path:
/temperature-avg
Step 4: Configure Panel
For time-series data:
- Path:
$.results[*] - Time field:
timestamp - Value field:
avg_temp
Transformation:
- Use Grafana transforms to reshape data
- Apply calculations as needed
Template Variables
Create dynamic dashboards:
- Go to Dashboard Settings → Variables
- Add variable for query name
- Use in panel:
/${queryVar}
Alerting
Set up alerts on your data:
- Edit panel → Alert tab
- Define condition (e.g., temp > 80)
- Configure notification channel
- Save
Thinking Tip:
Alerts query the API, which queries governed data. The audit trail remains intact.
Best Practices
| Practice | Why |
|---|---|
| One query per panel | Cleaner, more maintainable |
| Use variables | Change queries without editing |
| Set appropriate refresh | Balance freshness vs load |
| Add descriptions | Help team understand dashboards |
Next Steps
| If you want to... | Go to... |
|---|---|
| Try Power BI instead | Power BI → |
| Connect AI tools | MCP Guide → |