![]() $ SELECT mean("value") FROM "logins" WHERE "hostname" =~ /^]$/ AND $timeFilter GROUP BY time($_interval), "hostname" SELECT mean("value") FROM "logins" WHERE "hostname" =~ /^$host$/ AND $timeFilter GROUP BY time($_interval), "hostname" $, which is easier to read and write but does not allow you to use a variable in the middle of a word. The InfluxDB data source supports two variable syntaxes for use in the Query field: You can use this variable type to specify any number of key/value filters, and Grafana applies them automatically to all of your InfluxDB queries.įor more information, refer to Add ad hoc filters. InfluxDB supports the special Ad hoc filters variable type. This helps you change group-by using the variable list at the top of the dashboard. If you have a variable with key names, you can use this variable in a group-by clause. ![]() You can fetch key names for a given measurement: SHOW TAG KEYS You can also create nested variables, sometimes called chained variables.įor example, if you had a variable called region, you could have the hosts variable show only hosts from the selected region with a query like: SHOW TAG VALUES WITH KEY = "hostname" WHERE region = '$region' These queries can return results like measurement names, key names, or key values.įor more information, refer to Add query variable.įor example, to create a variable that contains all values for tag hostname, specify a query like this in the query variable Query: SHOW TAG VALUES WITH KEY = "hostname" If you add a query template variable, you can write an InfluxDB exploration (metadata) query. Grafana refers to such variables as template variables.įor an introduction to templating and template variables, refer to the Templating and Add and manage variables documentation. Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard. Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables. If you have alternative scalable approach please share it.Enterprise Open source InfluxDB template variables It will be very easy to retrieve all the annotation on a specific machine with anomaly. ![]() In addition, this feature links very well to the other feature that lets user query based on annotation that are represented in a template variable ( ). At the moment the only possible approach is that the annotator copy by hand the name identifier of the objects involved, that will require a lot more of (tedious) work that can be avoided by adding this simple feature. ![]() In the use case I am working, we want to put in place a pipeline for annotating anomalies on hypervisors/servers, and this feature will help in making the annotation feature really usable and scalable in this scenarios. This is a very crucial task in all the major industrial setting in which data are collected through sensor on many machine ( monitoring of health of train track, power plant, servers). Why is this needed: it is useful because it can help in the very general task of annotating a time series dataset for the application of machine learning algorithms. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |