- Newest
- Most votes
- Most comments
Based on the information provided, here's what you need to know about adding server/instance dropdown filters to your Grafana dashboards:
-
Yes, you do need to manually add the templating.list section to your dashboard JSON files before applying them via Helm. Variables are not automatically created - they must be defined in the dashboard JSON. The templating.list section you provided is the correct approach for adding a server/instance dropdown variable.
-
There isn't a direct way to inject dropdown variables into dashboards via Helm values.yaml without modifying the JSON. Helm templates can be used to generate the dashboard JSON with the required templating sections, but this would still involve modifying your templates to include the variable definitions.
-
Best practices for managing custom dashboard variables in Grafana on AWS EKS include:
- Make your dashboards portable by adding template variables for values like metric prefixes (using constant variables) and server names
- When exporting dashboards for others to use, include template variables for common elements that might change across environments
- Use variables to create single-source dashboards that can be reused across multiple identical data sources or servers
- Consider using constant variables for values that should be hidden in the dashboard but required during import
- Organize related dashboards in folders for better management
Variables are essential for creating interactive and dynamic dashboards, allowing users to adjust visualizations without needing full editing permissions. They're displayed as dropdown lists at the top of the dashboard and are particularly useful when you have multiple identical data sources or servers that you want to monitor with a single dashboard.
Sources
Adding and managing dashboard variables - Amazon Managed Grafana
Exporting and importing dashboards - Amazon Managed Grafana
Managing dashboards - Amazon Managed Grafana
Dashboard JSON model - Amazon Managed Grafana
