Skip to content
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

Merged
merged 5 commits into from
Jun 18, 2024

Conversation

FedeNQ
Copy link
Contributor

@FedeNQ FedeNQ commented Jun 4, 2024

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

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Which issue this PR fixes
fixes #2233

FedeNQ added 2 commits June 11, 2024 14:32
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
@FedeNQ FedeNQ force-pushed the add-grafana-dashboard branch from 00dc9fb to c3a362e Compare June 11, 2024 17:33
Copy link
Member

@amartinezfayo amartinezfayo left a 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.

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.
Copy link
Member

@amartinezfayo amartinezfayo Jun 13, 2024

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.

Suggested change
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"
Copy link
Member

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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"title": "Spire dashboard",
"title": "SPIRE dashboard",

"uid": "uid_spire_dashboard",
"version": 275,
"weekStart": ""
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing newline.

FedeNQ added 2 commits June 17, 2024 11:35
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Copy link
Member

@amartinezfayo amartinezfayo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @FedeNQ!

@MarcosDY MarcosDY merged commit 7e7f487 into spiffe:main Jun 18, 2024
33 checks passed
@MarcosDY MarcosDY added this to the 1.10.1 milestone Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide telemetry dashboard templates
3 participants