-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide Grafana dashboard JSON configuration #5188
Conversation
7e1f9d7
to
a3e7359
Compare
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
00dc9fb
to
c3a362e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @FedeNQ, this is awesome!
I have a couple of suggestions.
doc/telemetry/grafana.md
Outdated
1. **Open Grafana:** Log in to your Grafana instance. | ||
2. **Import Dashboard:** Click on the "+" icon in the sidebar and select "Import dashboard". | ||
3. **Upload JSON File:** Use the upload option to import the provided JSON file, or replace into "Import via dashboard JSON model". | ||
4. **Configure Data Source:** Ensure that the Prometheus data source is configured correctly for the imported dashboard to function properly. This could be done by looking for "Data sources" in the search bar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this step should be the second step, so we make sure that the data source is already defined and properly configured by the moment that the dashboard is imported.
I also have a suggestion for the text.
4. **Configure Data Source:** Ensure that the Prometheus data source is configured correctly for the imported dashboard to function properly. This could be done by looking for "Data sources" in the search bar. | |
4. **Configure Data Source:** Ensure that a Prometheus data source is configured with the Prometheus server that is monitoring SPIRE. You can search for "Data sources" in the search bar to go to the configuration of data sources. Please refer to the [Prometheus telemetry configuration documentation](telemetry_config.md#prometheus) for details about how to configure Prometheus as a metrics collector in SPIRE. |
{ | ||
"datasource": { | ||
"type": "prometheus", | ||
"uid": "uid_prometheus_grafana_datasource" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we can avoid having a static uid defined for the datasource if this would be defined as an input parameter and then refer to it as something like ${DS_UID_PROMETHEUS_GRAFANA_DATASOURCE}
.
I think that this could be easily achieved if the "export for sharing externally" option is selected when you have this dashboard exported.
That way, I think that this file would be easier to consume, as you don't need to have defined a data source with that exact same uid, but rather configure any data source and select it at the moment of importing.
}, | ||
"timepicker": {}, | ||
"timezone": "", | ||
"title": "Spire dashboard", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title": "Spire dashboard", | |
"title": "SPIRE dashboard", |
"uid": "uid_spire_dashboard", | ||
"version": 275, | ||
"weekStart": "" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: missing newline.
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @FedeNQ!
Add a JSON file to create a Grafana dashboard for visualizing Spire metrics provided by Prometheus.
Add Telemetry folder for metrics documentation.
Pull Request check list
Which issue this PR fixes
fixes #2233