Log queries | Grafana Labs
https://grafana.com/docs/loki/latest/logql/log_queriesLog queries. All LogQL queries contain a log stream selector. Optionally, the log stream selector can be followed by a log pipeline. A log pipeline is a set of stage expressions that are chained together and applied to the selected log streams. Each expression can filter out, parse, or mutate log lines and their respective labels.
Queries | Grafana Labs
grafana.com › docs › grafanaGrafana automatically calculates an appropriate interval and it can be used as a variable in templated queries. The variable is either in seconds: $__interval or in milliseconds: $__interval_ms. It is typically used in aggregation functions like sum or average. For example, a Prometheus query using the interval variable: rate (http_requests ...
Query examples | Grafana Labs
grafana.com › docs › lokiQuery examples. Some useful query examples here. Log Query examples Examples that filter on IP address. Return log lines that are not within a range of IPv4 addresses: {job_name="myapp"} != ip("192.168.4.5-192.168.4.20") This example matches log lines with all IPv4 subnet values 192.168.4.5/16 except IP address 192.168.4.2: