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

VictoriaMetrics datasource #18

Closed
d00m178 opened this issue Jan 6, 2022 · 5 comments
Closed

VictoriaMetrics datasource #18

d00m178 opened this issue Jan 6, 2022 · 5 comments

Comments

@d00m178
Copy link

d00m178 commented Jan 6, 2022

Is it possible to use this plugin with VictoriaMetrics?

@valyala
Copy link

valyala commented Jan 7, 2022

More general feature request: to add support or an example query for Prometheus datasource in Grafana. This datasource is compatible with VictoriaMetrics. See also MetricsQL docs.

@newrushbolt
Copy link

newrushbolt commented Jan 7, 2022

In order to make this plugin work with any prometheus-compatible datasource(including VictoriaMetrics), you need to set 2 queries: one for wind speed and one for speed direction.
You also need to set "Legend" field to "direction" and "speed" for the corresponding queries.
The fragment of JSON-schema:

"targets": [
    {
        "datasource": {
        "type": "prometheus",
        "uid": "P4169E866C3094E38"
        },
        "exemplar": false,
        "expr": "meteo_ws_mean{location=\"$location\"}",
        "instant": false,
        "interval": "",
        "legendFormat": "speed",
        "refId": "A"
    },
    {
        "datasource": {
        "type": "prometheus",
        "uid": "P4169E866C3094E38"
        },
        "exemplar": false,
        "expr": "meteo_wd_mean{location=\"$location\"}",
        "hide": false,
        "instant": false,
        "interval": "",
        "legendFormat": "direction",
        "refId": "B"
    }
]

Visual setup:
image

Result:
image

Tested with following versions:
c6b6d4f (Aug 13, 2021)
grafana/[email protected] (Dec 14, 2021)
VictoriaMetrics/[email protected] (Dec 27, 2020)

@d00m178
Copy link
Author

d00m178 commented Jan 7, 2022

confirm - it works)

jdavid added a commit that referenced this issue Jan 9, 2022
@jdavid
Copy link
Member

jdavid commented Jan 9, 2022

Thanks @newrushbolt , I've added a section to the README based on your comment, see https://github.com/spectraphilic/grafana-windrose#prometheus ; feel free to amend it with a PR if there's something wrong.

Closing.

@jdavid jdavid closed this as completed Jan 9, 2022
@krlosg07
Copy link

I confirm too, it works with v9.0.6 and influxdb....

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