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

More panels support for plugin #61

Open
tenmozes opened this issue Aug 21, 2024 · 13 comments · Fixed by #69
Open

More panels support for plugin #61

tenmozes opened this issue Aug 21, 2024 · 13 comments · Fixed by #69
Assignees

Comments

@tenmozes
Copy link
Contributor

That would be awesome to add support for the following panel types

  • stat
  • pie
  • time series
  • gauge
  • bar
@pgassmann
Copy link

I managed to create a nice dashboard with pie and timeseries visualization.
the data transformation needed is not trivial though.
grafik

Dashboard Definition Code:
logs-dashboard-victorialogs.json

Issues:

  • several Transformations needed to get data in the right format for the visualizations:
    Pie chart query:
host:~'^$host$' and compose_project:~'^$compose_project$' and compose_service:~'^$compose_service$' and $log_query
  | stats by (host) count() logs

Transformations:
grafik

Time series:

host:~'^$host$' and compose_project:~'^$compose_project$' and compose_service:~'^$compose_service$' and $log_query
  | stats by (_time:1h, host) count() logs

grafik

  • $__interval could not be used. | stats by (_time:$__interval, host) count() logs is forwarded in the query without being evaluated.

Positive:

  • it's possible now to create dashboards with variables
  • its possible to visualize log amounts in timeline
  • victorialogs works much faster than loki! Loki is not responding in time when querying just a subset of the same ingested logs.

@pgassmann
Copy link

@hagen1778 can you add support for the $__interval variable in queries?

Are there plans to simplify timeseries queries and other numeric queries for victorialogs?

@hagen1778
Copy link
Contributor

Stats panel support depends on VictoriaMetrics/VictoriaMetrics#6942
Time series panel support depends on VictoriaMetrics/VictoriaMetrics#6943

@hagen1778
Copy link
Contributor

Are there plans to simplify timeseries queries and other numeric queries for victorialogs?

@pgassmann yes, see this comment #61 (comment)

@hagen1778
Copy link
Contributor

@hagen1778 can you add support for the $__interval variable in queries?

@Loori-R do we have support for this variable? If no, would you mind creating a separate feature request for it?

@pgassmann
Copy link

@hagen1778 the $__interval variable support was just added. #69

@dmitryk-dk
Copy link
Contributor

@hagen1778 can you add support for the $__interval variable in queries?

@Loori-R do we have support for this variable? If no, would you mind creating a separate feature request for it?

I have merged the PR and made a follow-up PR to provide CHANGELOG and tests.

@yincongcyincong
Copy link
Contributor

@dmitryk-dk
Copy link
Contributor

dmitryk-dk commented Sep 5, 2024

I thins this function can be reused https://github.com/VictoriaMetrics/victoriametrics-datasource/blob/main/pkg/plugin/step.go#L113

but loki can use this type variable https://github.com/grafana/grafana/blob/main/pkg/tsdb/loki/parse_query.go#L25

We have similar logic in the victoriametrics-datasource. Parsing of the different templates was implemented.

valyala added a commit to VictoriaMetrics/VictoriaMetrics that referenced this issue Sep 6, 2024
…ing time series panels in VictoriaLogs plugin for Grafana

Updates #6943
Updates VictoriaMetrics/victorialogs-datasource#61
valyala added a commit to VictoriaMetrics/VictoriaMetrics that referenced this issue Sep 6, 2024
…ing time series panels in VictoriaLogs plugin for Grafana

Updates #6943
Updates VictoriaMetrics/victorialogs-datasource#61
@valyala
Copy link

valyala commented Sep 6, 2024

FYI, the /select/logsql/stats_query_range endpoint at VictoriaLogs is implemented in the commit 0a40064a6fa64f9d3e3ae60f6f12a9584dce459d . See these docs for details. This endpoint must be used by the VictoriaLogs datasource for building time series panel.

Also the /select/logsql/stats_query endpoint must be used by VictoriaLogs datasource for building stat, pie chart and gauge panels.

@crocchietta
Copy link

FYI, the /select/logsql/stats_query_range endpoint at VictoriaLogs is implemented in the commit 0a40064a6fa64f9d3e3ae60f6f12a9584dce459d . See these docs for details. This endpoint must be used by the VictoriaLogs datasource for building time series panel.

Also the /select/logsql/stats_query endpoint must be used by VictoriaLogs datasource for building stat, pie chart and gauge panels.

Are there any plans in the short term to take this into account in victorialogs-datasource?

@Loori-R
Copy link
Contributor

Loori-R commented Oct 2, 2024

Hi @crocchietta!

Thank you for your question. This is not planned in the near future, but we intend to address it later. The task is complex and will require time.

@crocchietta
Copy link

Hi @crocchietta!

Thank you for your question. This is not planned in the near future, but we intend to address it later. The task is complex and will require time.

I understand. In the meantime, I'll continue to use the transformations on the Grafana side (Convert field type).

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 a pull request may close this issue.

8 participants