Open robronayne opened 4 months ago
Hey, I think I found the solution. I had similar problem but I took it out of the nesting, if you know what I mean...
Basically I just started with curly bracket: "{" and then started with "title" etc. (there is no dashboard field) and end the config with "}". After that I've started container and I've got my dashboard.
Please try that:
{
"id": null,
"title": "Raspberry Pi Cluster Health",
"panels": [
{
"type": "graph",
"title": "CPU Usage",
"targets": [
{
"expr": "100 - (avg by(instance) (rate(node_cpu_seconds_total{mode='idle'}[5m])) * 100)",
"legendFormat": "{{{{ instance }}
}}",
"refId": "A"
}
],
"yaxes": [
{
"format": "percent",
"label": "CPU Usage",
"min": 0,
"max": 100
}
],
"xaxis": {
"show": true
},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 0
}
}
],
"schemaVersion": 16,
"version": 0,
"refresh": "5s"
}
Issue Summary
I am experiencing an issue with deploying a Grafana dashboard using Helm in a Kubernetes environment. Despite correctly formatting and mounting the JSON file for a dashboard, Grafana fails to load the dashboard, reporting that the "Dashboard title cannot be empty".
Environment
Kubernetes Cluster: K3S Raspberry Pi cluster Grafana Deployment: Using Helm Namespace: monitoring
Problem Details
The problem appears to be that Grafana fails to recognize the dashboard JSON file, even though it is correctly formatted and placed in the correct directory.
Configurations
grafana/templates/grafana-dashboards.yaml
grafana/dashboards/grafana-dashboards.yaml
Verification Steps
ConfigMap Verification
Verified that the ConfigMap is correctly created and contains the JSON:
Output:
File Verification in Pod
Verified that the JSON file is correctly mounted in the Grafana pod:
Output:
Grafana Logs
Checked Grafana logs for errors:
Output:
Observations
Despite the JSON file being correctly formatted and placed, Grafana logs indicate that the "Dashboard title cannot be empty". The title is clearly defined in the JSON file.
Request for Help
I am seeking assistance to resolve this issue where Grafana fails to recognize and load the dashboard JSON file, even though it is correctly formatted and placed in the specified directory. Any insights or solutions would be greatly appreciated.