Open tenmozes opened 3 weeks ago
I managed to create a nice dashboard with pie and timeseries visualization. the data transformation needed is not trivial though.
Dashboard Definition Code: logs-dashboard-victorialogs.json
Issues:
host:~'^$host$' and compose_project:~'^$compose_project$' and compose_service:~'^$compose_service$' and $log_query
| stats by (host) count() logs
Transformations:
Time series:
host:~'^$host$' and compose_project:~'^$compose_project$' and compose_service:~'^$compose_service$' and $log_query
| stats by (_time:1h, host) count() logs
$__interval
could not be used. | stats by (_time:$__interval, host) count() logs
is forwarded in the query without being evaluated.Positive:
@hagen1778 can you add support for the $__interval
variable in queries?
Are there plans to simplify timeseries queries and other numeric queries for victorialogs?
Stats panel support depends on https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6942 Time series panel support depends on https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6943
Are there plans to simplify timeseries queries and other numeric queries for victorialogs?
@pgassmann yes, see this comment https://github.com/VictoriaMetrics/victorialogs-datasource/issues/61#issuecomment-2331060221
@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?
@hagen1778 the $__interval variable support was just added. https://github.com/VictoriaMetrics/victorialogs-datasource/pull/69
@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.
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
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.
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.
That would be awesome to add support for the following panel types