Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs mvp #456

Merged
merged 59 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
051dc91
added patterns page
matryer Jun 13, 2024
2384610
small metadata changes
matryer Jun 14, 2024
693a689
updated Browse log volumes by type
matryer Jun 14, 2024
c0587a5
tweaks
matryer Jun 14, 2024
5069402
more work on docs
matryer Jun 14, 2024
6787f52
updated homepage
matryer Jun 14, 2024
ca33362
removed old file
matryer Jun 14, 2024
37769e9
added labels and detected fields docs
matryer Jun 14, 2024
27cb50a
updated heading
matryer Jun 14, 2024
2e69d74
Merge branch 'main' into docs-mvp
matryer Jun 14, 2024
e86d251
updated description
matryer Jun 14, 2024
7c1066f
better landing page
matryer Jun 14, 2024
7fe29c9
added preview disclaimer
matryer Jun 14, 2024
ca57c1f
added get started
matryer Jun 14, 2024
6c40bb3
simpler
matryer Jun 14, 2024
ef88c95
added Get started to main page
matryer Jun 14, 2024
11bb5c4
tweakz
matryer Jun 14, 2024
8907526
trying this
matryer Jun 14, 2024
93c8284
use correct preview warning
matryer Jun 18, 2024
0a666c7
Merge branch 'main' into docs-mvp
matryer Jun 27, 2024
eba0531
added npm command
matryer Jul 1, 2024
51d9680
Merge branch 'main' into docs-mvp
matryer Jul 2, 2024
9c0a6dd
Merge branch 'main' into docs-mvp
gtk-grafana Jul 2, 2024
7a22252
fixes
matryer Jul 2, 2024
4c3f827
fleshed out the guide
matryer Jul 2, 2024
1c61877
better bullets
matryer Jul 2, 2024
b05a9f0
better formatting
matryer Jul 2, 2024
709bd62
tidied up installation notes
matryer Jul 2, 2024
7c4292b
Merge branch 'main' into docs-mvp
gtk-grafana Jul 2, 2024
f6ed2f3
Update docs/sources/_index.md
gtk-grafana Jul 2, 2024
47401ac
Update docs/sources/_index.md
gtk-grafana Jul 2, 2024
6096527
Update docs/sources/_index.md
gtk-grafana Jul 2, 2024
2bef3fa
Merge branch 'main' into docs-mvp
matryer Jul 3, 2024
7b5f97a
fixed What's Next
matryer Jul 3, 2024
228b567
small docs tweak
matryer Jul 3, 2024
cad8c12
tweaked message
matryer Jul 4, 2024
c0124d4
added feedback prompt to preview notice
matryer Jul 4, 2024
cab2176
added troubleshooting page
matryer Jul 4, 2024
bd46816
Merge branch 'main' into docs-mvp
matryer Jul 4, 2024
d5cdd36
Detected Fields -> Fields
matryer Jul 4, 2024
bdf4442
Merge branch 'docs-mvp' of https://github.com/grafana/explore-logs in…
matryer Jul 4, 2024
13d198a
tweaks
matryer Jul 4, 2024
8a9238f
updated troubleshooting
matryer Jul 4, 2024
da4cb6d
added links to troubleshooting
matryer Jul 4, 2024
352ae0d
Merge branch 'docs-mvp' of https://github.com/grafana/explore-logs in…
matryer Jul 4, 2024
e5126df
minor tweaks
matryer Jul 4, 2024
6a9e704
tweaks
matryer Jul 4, 2024
39b9085
added grafana play
matryer Jul 4, 2024
ef5546b
Apply suggestions from code review
JStickler Jul 8, 2024
ccb401f
added image and updated content
matryer Jul 9, 2024
3766dfe
moved Public Preview banner to the very top
matryer Jul 9, 2024
a5f42b9
better Public Preview banner
matryer Jul 9, 2024
bb87676
small improvements
matryer Jul 9, 2024
0017248
added deciated access page
matryer Jul 10, 2024
7973a24
tweaked title
matryer Jul 10, 2024
5400eff
small tidy up
matryer Jul 10, 2024
edd439c
Merge branch 'main' into docs-mvp
matryer Jul 10, 2024
00255a8
Merge branch 'main' into docs-mvp
matryer Jul 10, 2024
dfc08ad
Merge branch 'main' into docs-mvp
matryer Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 66 additions & 1 deletion docs/sources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,73 @@
title: Explore Logs documentation
description: Documentation for Explore Logs
weight: 100
hero:
title: Explore Logs
level: 1
width: 100
height: 100
description: Explore Logs automatically visualises insights from your Loki logs.
cards:
title_class: pt-0 lh-1
items:
- title: Get started
href: ./get-started/
description: Install Explore Logs and take a tour of Explore Logs using your own data.
height: 24
- title: Labels and Fields
href: ./labels-and-fields/
description: Learn how Explore Logs uses labels and Fields to help you explore your Loki logs.
height: 24
- title: Log patterns
href: ./patterns/
description: Learn how you can use automatic log grouping to remove noise and find hard to locate logs.
height: 24
---

{{< admonition type="caution" >}}
Explore Logs is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
{{< /admonition >}}

# Explore Logs documentation

Placeholder for the Explore Logs documentation.
## Welcome to our new logs experience

Explore Logs automatically visualises insights from your Loki logs.

You can:

* Drill into your data using volume and text patterns.
* Easily find logs and log volumes for all of your services.
* Effortlessly filter logs based on their labels, fields, or patterns.
* Uncover related logs and monitor changes over time.
* Browse automatic visualizations of your log data based on its characteristics.
* Do all of this without writing LogQL queries.

![Screenshot of Explore Logs landing page](images/service_index.png)

## Who is Explore Logs for?

Explore Logs is for engineers of all levels of operational expertise. You no longer need to be an SRE wizard to get value from your logs.

Traditionally, you'd need a deep understanding of your systems in order to get the most out of Loki.

With Explore Logs, you get the same powerful insights, by just clicking around and glancing at visualizations which are automatically generated from your data.

## Explore

Take a look around, and please

{{< card-grid key="cards" type="simple" >}}
<br>
If you're having trouble using Explore Logs, check out our [troubleshooting guides]({{< relref "troubleshooting" >}}).

## Please share your feedback

Our new experiences are in their early stages, and we'd love to hear your feedback.

* You'll find a **Give feedback** link on the Explore Logs page in Grafana.
* You can also [fill out this form](https://forms.gle/1sYWCTPvD72T1dPH9) to send your thoughts directly to the team building the apps.

## What's next?

Dive into the [Get started with Explore Logs]({{< relref "get-started" >}}) article to learn how to set up Explore Logs and take a tour of the feature on your own data.
73 changes: 73 additions & 0 deletions docs/sources/access/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
description: Access and installation guide for Explore Logs.
keywords:
- Logs
- Explore
- Labels
- Analysis
menuTitle: Access or Install
title: Access or install Explore Logs
weight: 200
---

{{< admonition type="caution" >}}
Explore Logs is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
{{< /admonition >}}

# Access Explore Logs

To use Explore Logs on your own data, you can either access it in Grafana Cloud or install it in your own Grafana instance.

{{< docs/play title="the Grafana Play site" url="https://play.grafana.org/a/grafana-lokiexplore-app/explore?var-ds=ddhr3fttaw8aod&var-patterns=&var-lineFilter=&var-logsFormat=" >}}

## Access in Grafana Cloud

Explore Logs is already available in Grafana Cloud.

To access Explore Logs:

1. Open your Grafana stack in a web browser
1. In the main menu, select **Explore** > **Logs**.

## Installation

The following Loki and Grafana version and configuration are required:

- Loki v3.0+
- `--pattern-ingester.enabled=true` for pattern ingestion
- Volume endpoint enabled in Loki config:
```yaml
limits_config:
volume_enabled: true
```
- Grafana v11.0+

### Install via environment variable

If you want to [install the app in a docker container](https://grafana.com/docs/grafana/latest/setup-grafana/configure-docker/#install-plugins-in-the-docker-container), you need to configure the following environment variable:

```
GF_INSTALL_PLUGINS=https://storage.googleapis.com/integration-artifacts/grafana-lokiexplore-app/grafana-lokiexplore-app-latest.zip;grafana-lokiexplore-app
```

## Install using grafana-cli

You can install Explore Logs in your own Grafana instance using `grafana-cli`.

Using `grafana-cli` run the following command:
```sh
grafana-cli --pluginUrl=https://storage.googleapis.com/integration-artifacts/grafana-lokiexplore-app/grafana-lokiexplore-app-latest.zip plugins install grafana-lokiexplore-app
```

### Test with Docker Compose

You can test the app using the following command to spin up Grafana, Loki, and the Explore Logs App:
```sh
curl -L https://github.com/grafana/explore-logs/raw/main/scripts/run.sh | sh
```

This will download the https://github.com/grafana/explore-logs/blob/main/scripts/run.sh file and execute it.

That shell file will download some configuration files into your `/tmp/explore-logs` directory and start the docker containers via `docker compose` from there.

Once the docker container has started, navigate to `http://localhost:3000/a/grafana-lokiexplore-app/explore` to access Explore Logs.
51 changes: 51 additions & 0 deletions docs/sources/get-started/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
description: Get set up and take a tour of Explore Logs.
keywords:
- Logs
- Explore
- Labels
- Analysis
menuTitle: Get started
title: Get started with Explore Logs
weight: 200
---

{{< admonition type="caution" >}}
Explore Logs is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
{{< /admonition >}}

# Get started with Explore Logs

The best way to see what Explore Logs can do for you is to use it to explore your own data.

{{< admonition type="note" >}}
See also instructions for how to [access or install Explore Logs]({{< relref "../access" >}}).
{{< /admonition >}}

## Guide

We will walk through a simple step-by-step guide providing a tour of Explore Logs.

While you are browsing around the app, look out for any unexpected spikes. Or perhaps one of your services is down and has stopped logging. Maybe you're seeing an increase in errors after a recent release.

To take a tour of Explore Logs, follow these steps:

1. In the main navigation bar click on **Explore** > **Logs**.
2. You’ll land on the **Service overview page** showing time series and log visualizations for all the services in your selected Loki instance. ([No services?]({{< relref "../troubleshooting/#there-are-no-services" >}}))
3. Change your data source with the drop-down on the top left, and select a recent time range.
{{< admonition type="tip" >}}
You can modify your time range in two ways:
- With the standard time range picker on the top right.
- By clicking and dragging the time range on any time series visualization.
{{< /admonition >}}
5. Services are shown based on the volume of logs, or you can search for the service by name.
6. Click **Select** on the service you would like to explore.
7. Click on the **Labels** tab to see visualizations of the log volume for each label. ([No labels?]({{< relref "../troubleshooting/#there-are-no-labels" >}}))
8. Select a label to see the log volume for each value of that label. <br><br> Explore Logs shows you the volume of logs with specific Labels and fields. Learn more about [Labels and Fields]({{< relref "../labels-and-fields" >}}).<br><br>

9. Select the **Fields** tab to see visualizations of the log volume for each Field. You can drill down in the same way.
10. Click on the **Patterns** tab to see the log volume for each automatically detected pattern. <br><br> Log patterns allow you to work with groups of similar log lines. You can hide them if they're noise, or focus in on them if they're useful. Learn more about [Log Patterns]({{< relref "../patterns" >}}).

### What do you think?

Please [share your feedback](https://forms.gle/1sYWCTPvD72T1dPH9) and help make Explore Logs better.
Binary file added docs/sources/images/service_index.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions docs/sources/labels-and-fields/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
description: Learn how breaking logs down by Labels and Fields can help you find the signal in the noise.
keywords:
- Logs
- Explore
- Labels
- Analysis
menuTitle: Labels and Fields
title: Labels and Fields
weight: 300
---

{{< admonition type="caution" >}}
Explore Logs is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
{{< /admonition >}}

# Labels and Fields

Explore Logs visualises log volumes for the labels attached to your log lines, and fields automatically extracted from the text of the line itself.

A special `detected_level` label is added to all log lines where Loki assigns a level of the log line, including `debug`, `info`, `warn`, `error`, `fatal`, `critical`, `trace`, or `unknown` if no level could be determined.

You can click **Select** on a Label or Field to access a breakdown of its values, seeing the log volumes visualized along the way.

This experience is useful for understanding the traits of your system, and for spotting spikes or other changes.

{{< admonition type="note" >}}
The type of data being expressed in a label or field may require different treatments. For example, fields expressing `bytes` are visualized differently than other types of data. Please [share your feedback](https://forms.gle/1sYWCTPvD72T1dPH9) if you have suggestions for how to improve this experience.
{{< /admonition >}}

## Guide

To explore labels with your own data, follow these steps:

1. In the main menu, select **Explore** > **Logs**.
1. Click the **Select** button for the **Service** you want to explore. ([No services?]({{< relref "../troubleshooting/#there-are-no-services" >}}))
1. Click the **Labels** tab.
1. Browse the labels detected for this service. ([No labels?]({{< relref "../troubleshooting/#there-are-no-labels" >}}))
1. Look for an interesting label and click the **Select** button.

You will see a selection of visualizations showing the volume of each one.

You can repeat the same steps in the **Fields** tab to see fields that were extracted from your log lines.

## What next?

Learn about how [Log patterns]({{< relref "../patterns" >}}) can help you deal with different types of log lines in bulk.
111 changes: 111 additions & 0 deletions docs/sources/patterns/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
description: Use Log patterns to detect and analyze types of log lines.
keywords:
- Logs
- Log Patterns
- Explore
- Patterns
- Drain
- Categorization
- Analysis
menuTitle: Log patterns
title: Log patterns
weight: 400
---

{{< admonition type="caution" >}}
Explore Logs is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
{{< /admonition >}}

# Log patterns

Log patterns allow you to work with groups of similar log lines. You can hide them if they're noise, or focus in on them if they're useful.

Patterns are automatically extracted when your logs are ingested.

The Explore Logs app shows you the patterns alongside their log volumes. From this view, you can investigate spikes and include or exclude those log lines from your view.

Patterns are ephemeral and can change over time as your logging evolves.

## More use cases

Log patterns allow you to:

* Browse the log volume over time of different types of logs.
* Simplify log management by grouping similar log entries.
* Enhance log searches by focusing on relevant patterns.
* Improve troubleshooting efficiency by highlighting critical log lines.
* Reduce storage requirements by minimizing log data.
* Filter out noisy log lines during exploration.
* Identify specific log lines for targeted analysis.

## Guides

We've outlined the steps you'll need to take to perform these common use cases.

### Browse log volumes by type

Explore Logs proactively visualizes your log volume data per detected pattern, broken down in various ways. At a glance you can immediately spot spikes or other changes.

For example, if your HTTP service is suffering from a DDoS attack, the relevant graphs will clearly show the spikes. From here you can drill down to discover enough details about the attack to counter it.

### Targetted analysis

If you know the kind of log line you're looking for, Log patterns are an easy way to get everything else out of the way.

To view only a specific set of patterns, perform the following steps:

1. In the main menu, select **Explore** > **Logs**.
2. Select the relevant **Service**. ([No services?]({{< relref "../troubleshooting/#there-are-no-services" >}}))
3. Click the **Patterns** tab.
4. Identify a pattern that matches the type of logs you're interested in viewing. ([No patterns?]({{< relref "../troubleshooting/#there-are-no-patterns" >}}))
5. Click the **Include** button.
6. Return to the **Logs** tab and notice the filtered view.

### Hide noisy log lines

To hide noisy log lines, perform the following steps:

1. In the main menu, select **Explore** > **Logs**.
2. Select the relevant **Service**. ([No services?]({{< relref "../troubleshooting/#there-are-no-services" >}}))
3. Open the **Patterns** tab.
4. Identify a pattern that represents noise in the logs that you want to remove. ([No patterns?]({{< relref "../troubleshooting/#there-are-no-patterns" >}}))
5. Click the **Exclude** button to exclude that pattern.
6. Return to the **Logs** tab and notice the noisy pattern has been removed.

You can repeat steps 4 and 5 to exclude multiple patterns.

## Pattern extraction

Loki extracts patterns from a stream of log lines.

For example, if your service logs lines like this:

```
duration=255ms trace_id=abc001 GET /path/to/endpoint/2
user loaded: 25666
user loaded: 14544
duration=255ms trace_id=abc002 POST /path/to/endpoint/2
user loaded: 25666
duration=355ms trace_id=abc003 GET /path/to/endpoint/1
duration=355ms trace_id=abc004 POST /path/to/endpoint/1
duration=255ms trace_id=abc005 POST /path/to/endpoint/2
user loaded: 89255
duration=4244ms trace_id=abc006 GET /path/to/endpoint/1
user loaded: 25666
duration=255ms trace_id=abc007 GET /path/to/endpoint/2
```

Two patterns would emerge where the static tokens are preserved literally, and dynamic values are turned into placeholders:

Pattern 1: `duration=<_> trace_id=<_> <_> /path/to/endpoint/<_>`

Pattern 2: `user loaded: <_>`

{{< admonition type="note" >}}
Since Loki 3.0, you can make queries using this simplified template format which is much faster than using regex.
{{< /admonition >}}

## What next?

See how Explore Logs works on your own data by following our [Get started guide]({{< relref "../get-started" >}}).
Loading