diff --git a/docs/sources/explore/index.md b/docs/sources/explore/index.md index b1039ac2cb5..59c35daa1ec 100644 --- a/docs/sources/explore/index.md +++ b/docs/sources/explore/index.md @@ -155,6 +155,10 @@ Along with metrics, Explore allows you to investigate your logs with the followi - [InfluxDB](../datasources/influxdb) - [Elasticsearch](../datasources/elasticsearch) +### Logs visualization + +Results of log queries are shown as histograms in the graph and individual logs are displayed below. If the data source does not send histogram data for the requested time range, the logs model computes a time series based on the log row counts bucketed by an automatically calculated time interval and the start of the histogram is then anchored by the first log row's timestamp from the result. The end of the time series is anchored to the time picker's **To** range. + ### Visualization options You can customize how logs are displayed and select which columns are shown. @@ -297,4 +301,4 @@ This functionality is similar to the panel inspector [Stats tab]({{< relref "../ {{< docs-imagebox img="/img/docs/v71/query_inspector_explore.png" class="docs-image--no-shadow" caption="Screenshot of the query inspector button in Explore" >}} - \ No newline at end of file + diff --git a/public/app/plugins/datasource/loki/components/LokiCheatSheet.tsx b/public/app/plugins/datasource/loki/components/LokiCheatSheet.tsx index 56812dc719f..a7974a2ab5d 100644 --- a/public/app/plugins/datasource/loki/components/LokiCheatSheet.tsx +++ b/public/app/plugins/datasource/loki/components/LokiCheatSheet.tsx @@ -8,6 +8,12 @@ const PREFERRED_LABELS = ['job', 'app', 'k8s_app']; const EXAMPLES_LIMIT = 5; const LOGQL_EXAMPLES = [ + { + title: 'Log pipeline', + expression: '{job="mysql"} |= "metrics" | logfmt | duration > 10s', + label: + 'This query targets the MySQL job, filters out logs that don’t contain the word "metrics" and parses each log line to extract more labels and filters with them.', + }, { title: 'Count over time', expression: 'count_over_time({job="mysql"}[5m])',