Grafana
grafana.com › docs › loki › latest › query › query_examples
Query examples | Grafana Loki documentation
October 2, 2020 - These LogQL query examples have explanations of what the queries accomplish. Return log lines that are not within a range of IPv4 addresses: ... This example matches log lines with all IPv4 subnet values 192.168.4.5/16 except IP address 192.168.4.2: ... {job="security"} |~ "Invalid user.*" | regexp "(^(?P<user>\\S+ {1,2}){8})" | regexp "(^(?P<ip>\\S+ {1,2}){10})" | line_format "IP = {{.ip}}\tUSER = {{.user}}" ... {job="security"} != "grafana_com" |= "session opened" != "sudo: " | regexp "(^(?P<user>\\S+ {1,2}){11})" | line_format "USER = {{.user}}"
Grafana
grafana.com › docs › grafana › latest › panels-visualizations › query-transform-data
Query and transform data | Grafana documentation
Grafana automatically calculates an appropriate interval that you can use as a variable in templated queries. The variable is measured in either seconds ($__interval) or milliseconds ($__interval_ms). Intervals are typically used in aggregation functions like sum or average. For example, this is a Prometheus query that uses the interval variable: rate(http_requests_total[$__interval]).
13:11
How to query Grafana Loki with LogQL - YouTube
08:08
SQL Expressions Demo: Smarter Data Transformations in Grafana | ...
08:58
Unlock Powerful Insights: Build an Amazing Grafana MSSQL Dashboard ...
05:48
Grafana: dynamic sql queries 1 - YouTube
18:17
Grafana Variables explained with examples - YouTube
02:54
How to Add Annotation Queries to Your Grafana Dashboards | Grafana ...
Grafana
grafana.com › docs › grafana › latest › visualizations › panels-visualizations › query-transform-data › expression-queries
Write expression queries | Grafana documentation
Copying data from storage to the Grafana server for processing is inefficient, so expressions are targeted at lightweight data processing. Expressions work with data source queries that return time series or number data. They also operate on multiple-dimensional data. For example, a query that returns multiple series, where each series is identified by labels or tags.
Grafana
grafana.com › docs › grafana › latest › datasources › mysql › query-editor
MySQL query editor | Grafana documentation
To run a time series query you must include a column named time that returns either a SQL datetime value or a numeric datatype representing the UNIX epoch time in seconds. Additionally, the query results must be sorted by the time column for proper visualization in panels. The examples in this section refer to the data in the following table:
Grafana
grafana.com › docs › grafana › latest › datasources › influxdb › query-editor
InfluxDB query editor | Grafana documentation
If you use raw query mode, your query must include WHERE $timeFilter. You should also provide a group by time and an aggregation function. Otherwise, InfluxDB may return hundreds of thousands of data points, potentially causing your browser to hang. You can enter regular expressions for metric names or tag filter values. Wrap the regular expression pattern in forward slashes (/), as shown in this example: /measurement/. Grafana ...
AWS
docs.aws.amazon.com › amazon managed grafana › user guide › use your grafana workspace › working in grafana version 8 › panels › queries
Queries - Amazon Managed Grafana
Grafana workspaces supports up to 26 queries per panel. Query editors are forms that help you write queries. Depending on your data source, the query editor might provide automatic completion, metric names, or variable suggestion. Because of differences between query languages, data sources might have query editors that look different. Data sources have different query languages and syntaxes to ask for the data. Here are two query examples...
Akamai TechDocs
techdocs.akamai.com › trafficpeak › docs › grafana-query-builder
Grafana query builder
March 1, 2026 - To build a new dashboard widget, start by building the SQL query that provides the data for that widget. Grafana's Query Builder will help you build that query using your TrafficPeak data for live examples. To view the Query Builder in Grafana visit the main menu and select Explore . The Query ...
Grafana
grafana.com › docs › grafana › latest › datasources › tempo › query-editor › traceql-search
Search traces using the query builder | Grafana documentation
The generated query depends on the operator you choose: Equals (=) or other non-regular expression operators: Each value becomes a separate condition joined with || inside parentheses. For the not-equals (!=) operator, conditions are joined with && instead. Regular expressions match (=~) or not match (!~): Values are concatenated with | inside a single quoted string. This capability only applies to fields with drop-down value selection. For example, if you select Span Name with the = operator and choose both get and log_results_cache as values, the generated query uses separate conditions:
Grafana
grafana.com › docs › grafana › latest › datasources › mssql › query-editor
Microsoft SQL Server query editor | Grafana documentation
Use the Data operations drop-down to select a macro like $__timeGroup or $__timeGroupAlias. Select a time column from the Column drop-down and a time interval from the Interval drop-down to create a time-series query. ... You can also add custom value to the Data operations. For example, a function that’s not in the drop-down list.
Grafana
grafana.com › docs › loki › latest › query
Query Loki | Grafana Loki documentation
Format expressions can be used to change the way lines (line_format()) and labels (label_format()) are displayed. Note that format expressions do not change the underlying source data, only the results that are returned by the query. The previous example uses a line_format() function to rewrite the original log line: