victorialogs-datasource
victorialogs-datasource copied to clipboard
support for multi-select operator in AD hoc Filters for VictoriaLogs Grafana datasource
Is your feature request related to a problem? Please describe
Curently, multi-select operators, One of (=|) or Not one of (!=|), are not supported when adding "Ad hoc filter" for victorialogs datasource.
https://grafana.com/docs/grafana/latest/dashboards/use-dashboards/#filter-dashboard-data
Only
Describe the solution you'd like
being more user friendly for using Ad hoc Filters
Describe alternatives you've considered
using regexp expression
source.ip =~ 192.168.6.124|192.168.5.64
Additional information
No response
It would be great adding in, not in, contains_any and not contains_any options to the ad-hoc filter, with the ability to select multiple values out of the suggested values.
Side note: I think it would be great adding plaintext ad-hoc filter option, which allows writing arbitrary LogsQL filters as a plaintext inside the input field. The entered plaintext ad-hoc filter must be passed to VictoriaLogs as extra_filters query arg. It would be great passing other variable-based filters via extra_filters query arg too, in order to reduce the probability of incorrect modification of the original LogsQL query at plugin side.
P.S. it is better to move this feature request to the repository for VictoriaLogs plugin for Grafana - https://github.com/VictoriaMetrics/victorialogs-datasource/issues
Cc @Loori-R , @dmitryk-dk , @hagen1778 .
It would be great adding
in,not in,contains_anyandnot contains_anyoptions to the ad-hoc filter, with the ability to select multiple values out of the suggested values.
Currently, Grafana does not support adding or modifying operators for ad-hoc filters at the plugin level. This limitation is set by Grafana itself and can only be changed via core modifications.
Currently, Grafana does not support adding or modifying operators for ad-hoc filters at the plugin level. This limitation is set by Grafana itself and can only be changed via core modifications.
Could you file the corresponding feature request at Grafana repository, so Grafana developers become aware of the feature? This may help other Grafana plugins too.
What about implementing plaintext ad-hoc filter as described above?
Also, please make sure that all the selected filters are passed via extra_filters query arg as described above, in order to eliminate the possibility of improper query update with the selected filters at the plugin side. This concerns both Grafana plugin for VictoriaLogs and Web UI for VictoriaLogs.
FYI, the commit f9e312f35ad337d2bf69a0ec14bb1ae952d344f7 adds support for multiple extra_filters and extra_stream_filters query args according to these docs. This should simplify using these args in VictoriaLogs plugin for Grafana and in VictoriaLogs web UI. This commit will be included in the next release of VictoriaLogs.
VictoriaLogs accepts multiple extra_filters query args across all the supported querying APIs starting from v1.21.0-victorialogs according to these docs.
VictoriaLogs accepts multiple
extra_filtersquery args across all the supported querying APIs starting from v1.21.0-victorialogs according to these docs.
How do we use this feature in grafana datasource?
The feature has been included in the v0.20.0 release of victorialogs-datasource. Closing the issue as resolved.
I am running v.020 but still do not see one of (=|) or Not one of (!=|)
Am I missing something? How can I enable it?
I am running v.020 but still do not see one of (=|) or Not one of (!=|)
Am I missing something? How can I enable it?
Hey @enotspe . Which version of grafana do you use? The feature available only from 11.3.x as you can see in the changelog
Grafana cloud.
I should be on the latest version of grafana
Grafana cloud.
I should be on the latest version of grafana
Checked it now on grafana cloud, for me it works as expected. Did you try to use it via adhoc filters?
I dont see it on my instance
maybe I am missing something on my side. How is your data? how is the config of your plugin?
@enotspe just set the db url. That's it.
@enotspe Could be this issue related to your problem?
you are right.
Once I refer to an specific datasource, then I do see them