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

Prometheus #14

Open
hatamiarash7 opened this issue Dec 19, 2022 · 4 comments
Open

Prometheus #14

hatamiarash7 opened this issue Dec 19, 2022 · 4 comments

Comments

@hatamiarash7
Copy link

Can I use this plugin with Prometheus metrics? Is there any way here? any idea?

@Sherlouk
Copy link

Posting here in case it helps anybody else out, it is possible to use this plugin with a Prometheus datasource.

Prometheus

This is based on using Grafana v9.0.2.

Metric Structure

It is best to have a counter metric where the value will be used to provide the thickness of the links and the labels can be used to define the columns. You can name the columns anything.

metric{from="<from>", to="<to>"} <value>
metric{from="<from>", to="<to>"} <value>
metric{from="<from>", to="<to>"} <value>

Setting up your Query

The simplest query is where you use sum by, providing each of the columns that you want to have groups for as well as the metric name.

sum by (labelOne, labelTwo) (metric)

You may of course apply filters to the metric, and have more columns depending on your data set.

Under "Options" the "Format" value must be set to "Table".

Next, head to "Transform", select "Organize Fields" and tap on the eye icon next to "Time" in order to hide this default column. You may also use this opportunity to reorder columns by dragging the handle on the left, or renaming columns using the input box on the right.

@Christian42
Copy link

Thank you so much @Sherlouk, this instruction was great!
Nice results :-)

screenshot

@KatrinaTurner
Copy link
Collaborator

Thanks guys! This looks great! Gonna leave this open in case others want to see this example.

@hg5050
Copy link

hg5050 commented Mar 7, 2024

I can't get solved. Is it possible to give Example? I mean screenshot of the Metrics name and Transform set for the given Sankey Diagramme.
Thanks in advance!

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

No branches or pull requests

5 participants