diff --git a/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss b/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss index 3d0ef869d..37f6ed914 100644 --- a/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss +++ b/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss @@ -414,6 +414,10 @@ article { .box-overflow{ overflow-x: scroll; } + pre.box-overflow{ + overflow-x: scroll; + padding-bottom: 0; + } .logfmt-module,.json-module,.pattern-module,.regular-module,.unpack-module,.line-module,.formatting-module,.unwrapped-module{ pre { border: 0; diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index d65b6fd97..ccc9d452a 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -286,7 +286,7 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
LogQL is Grafana Loki’s PromQL-inspired query language. Queries act as if they are a distributed grep to aggregate log sources. LogQL uses labels and operators for filtering.
+LogQL is Grafana Loki’s PromQL-inspired query language. Queries act as if they are a distributed grep to aggregate log sources. LogQL uses labels and operators for filtering.
There are two types of LogQL queries:
{container="query-frontend",namespace="loki-dev"} which targets the query-frontend container in the loki-dev namespace.|= "metrics.go" | logfmt | duration > 10s and throughput_mb < 500 which will filter out log that contains the word metrics.go, then parses each log line to extract more labels and filter with them.To avoid escaping special characters you can use the+`(backtick) instead of"when quoting strings. For example`\w+`is the same as"\\w+". This is specially useful when writing a regular expression which contains multiple
backslashes that require escaping.
To avoid escaping special characters you can use the`(backtick) instead of"when quoting strings. For example`\w+`is the same as"\\w+". This is specially useful when writing a regular expression which contains multiple
backslashes that require escaping.
The right side can alternatively be a template string (double quoted or backtick), for example dst="{{.status}} {{.query}}", in which case the dst label value is replaced by the result of the text/template evaluation. This is the same template engine as the | line_format expression, which means labels are available as variables and you can use the same list of functions.
In both cases, if the destination label doesn’t exist, then a new one is created.
The renaming form dst=src will drop the src label after remapping it to the dst label. However, the template form will preserve the referenced labels, such that dst="{{.src}}" results in both dst and src having the same value.
A single label name can only appear once per expression. This means+| label_format foo=bar,foo="new"is not allowed but you can use two expressions for the desired effect:| label_format foo=bar | label_format foo="new"
A single label name can only appear once per expression. This means| label_format foo=bar,foo="new"is not allowed but you can use two expressions for the desired effect:| label_format foo=bar | label_format foo="new"