-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 support for Perses dashboards in Mixins. #7702
Comments
Currently, there are no existing integrations or references to Perses in the Thanos codebase or documentation. To add support for Perses dashboards in the Mixins, you would need to create and customize jsonnet files similar to how Grafana dashboards are managed. This involves defining the necessary configurations and selectors for Perses dashboards in the You can follow the existing structure used for Grafana dashboards as a reference. For example, you can look at how Here is a basic outline of steps you might take:
For example, you might add a new section in {
perses+:: {
selector: 'job=~".*thanos-perses.*"',
title: '%(prefix)sPerses' % $.dashboard.prefix,
},
// Additional configurations for other components...
} And create a new jsonnet file for a Perses dashboard, e.g., local g = import '../lib/thanos-perses-builder/builder.libsonnet';
local utils = import '../lib/utils.libsonnet';
{
local thanos = self,
perses+:: {
selector: error 'must provide selector for Thanos Perses dashboard',
title: error 'must provide title for Thanos Perses dashboard',
dashboard:: {
selector: std.join(', ', thanos.dashboard.selector + ['job=~"$job"']),
dimensions: std.join(', ', thanos.dashboard.dimensions + ['job']),
},
},
persesDashboards+:: {
[if thanos.perses != null then 'perses.json']:
g.dashboard(thanos.perses.title)
.addRow(
g.row('Perses Metrics')
.addPanel(
g.panel('Metric Panel') +
g.queryPanel(
'sum by (%(dimensions)s) (rate(thanos_perses_metric_total{%(selector)s}[$__rate_interval]))' % thanos.perses.dashboard,
'{{ metric }}',
)
)
)
},
} This is a simplified example, and you would need to adapt it to fit the specific requirements and structure of Perses dashboards. |
Is Perses not compatible with Grafana dashboard JSON definitions? |
Perses provides a different JSON definition for the dashboard and provides a migration system to convert the Grafana dashboard to the Perses one. But I would say on a long term, it's better to provide the Perses definition directly. Like @nicolastakashi mentioned, you can code your dashboard with the Go SDK that Perses is providing |
and FYI, Perses doesn't provide any support for Jsonnet. Only Cuelang or Golang are supported for the moment |
Is your proposal related to a problem?
Perses is an open-source project aimed at simplifying the creation and management of dashboards for observability and monitoring. It offers a more flexible and modern alternative to existing solutions like Grafana.
Recently, Perses was accepted into the CNCF Sandbox, marking a significant milestone for the project. Given this momentum, we believe now is the perfect time to start incorporating support for Perses dashboards into the existing monitoring Mixins.
Currently, Perses dashboards can be created using the Perses GoLang SDK, as we do not support Jsonnet at the moment.
I’d love to hear your thoughts on this approach.
Describe the solution you'd like
(Describe your proposed solution here.)
N/A
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: