Skip to content

Commit 2dc19e8

Browse files
added new course
1 parent 72f9994 commit 2dc19e8

File tree

9 files changed

+127
-5
lines changed

9 files changed

+127
-5
lines changed

full-stack/intro-to-mltp/setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
echo "RUNNING SETUP SCRIPT"
44

55
# Clone the tutorial environment repository if it doesn't already exist
6-
if [ ! -d "tutorial-environment" ]; then
6+
if [ ! -d "intro-to-mltp" ]; then
77
git clone https://github.com/grafana/intro-to-mltp.git || { echo "Failed to clone repository"; exit 1; }
88
fi
99

loki/intro-to-logging/finished.md

-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ Head back to the video to continue with Intro to logging.
1010

1111
[![Intro to logging](https://img.youtube.com/vi/TLnH7efQNd0/0.jpg)](https://www.youtube.com/watch?v=TLnH7efQNd0)
1212

13-
![Loki Quickstart](../../assets/loki-ile.png)

loki/structure-of-logs/finished.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<p><img src="../assets/loki-logo.png" style=" height: 90px"></p>
1+
![Loki Quickstart](../../assets/loki-ile.png)
22

3-
# Intro to Logging
3+
# Structure of log
44

55
You have completed the **Structure of logs* demo. This course is part of an **Intro to Grafana Loki** series. In this course, you learned the basics of log components and how they are structured.
66

@@ -10,4 +10,3 @@ Head back to the video to continue with Structure of Logging.
1010

1111
[![Structure of Logs](https://img.youtube.com/vi/8_JyqEqaHiw/0.jpg))](https://www.youtube.com/watch?v=8_JyqEqaHiw)
1212

13-
![Loki Quickstart](../../assets/loki-ile.png)

loki/what-is-loki/finished.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
![Loki Quickstart](../../assets/loki-ile.png)
2+
3+
# What is Loki?
4+
5+
You have completed the **What is loki* demo. This course is part of an **Intro to Grafana Loki** series. In this course, you learned the basics of Grafana Loki and how it can be used to store and query logs.
6+
7+
## What's Next?
8+
9+
Head back to the video to continue with What is Loki.
10+
11+
[![What is Loki](https://img.youtube.com/vi/1uk8LtQqsZQ/0.jpg)](https://www.youtube.com/watch?v=1uk8LtQqsZQ)

loki/what-is-loki/index.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"title": "Loki Quickstart Demo",
3+
"description": "This sandbox provides an online enviroment for testing the Loki quickstart demo.",
4+
"details": {
5+
"intro": {
6+
"text": "intro.md"
7+
},
8+
"steps": [
9+
{
10+
"text": "step1.md"
11+
},
12+
{
13+
"text": "step2.md"
14+
}
15+
],
16+
"finish": {
17+
"text": "finished.md"
18+
}
19+
}
20+
,
21+
"backend": {
22+
"imageid": "ubuntu"
23+
}
24+
}

loki/what-is-loki/intro.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
![Loki Quickstart](../../assets/loki-ile.png)
2+
3+
4+
# "What is Loki" Sandbox Enviroment
5+
6+
[![What is Loki](https://img.youtube.com/vi/1uk8LtQqsZQ/0.jpg)](https://www.youtube.com/watch?v=1uk8LtQqsZQ)
7+
8+
## Sandbox Overview
9+
10+
This online sandbox is part of the How to get started with Loki video. In this sandbox, you will learn how to use Grafana Loki in monolithic store and query your logs. Here is a run through of the architecture:
11+
12+
* **Loki**: Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus. It is designed to be very cost-effective and easy to operate. It does not index the contents of the logs, but rather a set of labels for each log stream.
13+
14+
* **Alloy**: Alloy the new Otel Collector created by Grafana Labs. It is a new way to collect, process, and ship logs, metrics and traces. We will be using Alloy to collect logs from our application.
15+
16+
* **Carnivorous Greenhouse**: Carnivorous Greenhouse is a simple application that generates logs. This allows users to create an account, login and collect metrics from a series of hungry plants. All of these actions generate logs that are sent to Loki. The application can also be toggled to generate errors.
17+
18+
* **Grafana**: Ofcourse the architecture would not be complete without Grafana. Grafana will be used to visualize the logs generated by the Carnivorous Greenhouse application. We will be making use of a new feature in Grafana 11 called Explore Logs.
19+
20+
## Housekeeping
21+
22+
This environment runs an install script on startup automatically. Your training environment is ready to go once the script has completed and you see the following message:
23+
24+
```plaintext
25+
WHAT IS LOKI?
26+
```
27+
28+
Continue to the next step to find the tutorial environment navigation URLs.
29+
30+
## Reporting Issues
31+
If you encounter any issues with the environment, please report them to the [GitHub repository](https://github.com/grafana/killercoda)

loki/what-is-loki/setup.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
echo "RUNNING SETUP SCRIPT"
4+
5+
# Clone the tutorial environment repository if it doesn't already exist
6+
if [ ! -d "loki-fundamentals" ]; then
7+
git https://github.com/grafana/loki-fundamentals.git || { echo "Failed to clone repository"; exit 1; }
8+
fi
9+
10+
# Enter the directory and switch to the required branch
11+
cd loki-fundamentals && git checkout what-is-loki || { echo "Failed to checkout branch"; exit 1; }
12+
13+
echo "Building training instance...."
14+
docker-compose up -d || { echo "Failed to start docker containers"; exit 1; }
15+
16+
# Update and install required packages
17+
echo "Updating and installing required packages..."
18+
sudo apt-get update && sudo apt-get install -y figlet; clear; echo -e "\e[32m$(figlet -f standard 'What is')\e[0m"; echo -e "\e[33m$(figlet -f standard 'Loki?')\e[0m"

loki/what-is-loki/step1.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
# Step 1: Generating some logs
3+
4+
In this step, we will generate some logs using the Carnivorous Greenhouse application. This application generates logs when you create an account, login, and collect metrics from a series of hungry plants. The logs are sent to Loki.
5+
6+
To access the application, click this link to Carnivorous Greenhouse: **[http://localhost:5005]({{TRAFFIC_HOST1_5005}})**
7+
8+
## Generate some logs
9+
10+
1. Create an account by clicking the **Sign Up** button.
11+
2. Create a user by entering a username and password.
12+
3. Log in by clicking the **Login** button.
13+
4. Create your first plant by:
14+
* Adding a name
15+
* Selecting a plant type
16+
* Clicking the **Add Plant** button.
17+
18+
### Optional: Generate errors
19+
20+
The plants do a good job eating all the bugs, but sometimes they get a little too hungry and cause errors. To generate an error, toggle the **Toggle Error mode**. This will cause a variety of errors to occure such as; sign up errors, login errors, and plant creation errors. These errors can be investigated in the logs.
21+
22+

loki/what-is-loki/step2.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
# Step 2: Investigating the logs
3+
4+
In the previous step, we generated logs using the Carnivorous Greenhouse application. In this step, we will investigate the logs that were generated. These logs where tailed by Alloy and sent to Loki. Let's explore the logs.
5+
6+
## Explore the logs
7+
8+
To start exploring the logs, we will use the Grafana Explore Logs view. This is a new queriless way to explore logs in Grafana.
9+
10+
1. To access this view, follow this link: **[http://localhost:3000/a/grafana-lokiexplore-app/explore]({{TRAFFIC_HOST1_3000}}/a/grafana-lokiexplore-app/explore)**
11+
12+
2. From there experiment with the different options available to you. Drill down into the logs and see what you can find.
13+
14+
15+
### Open In Explore
16+
17+
You all also have the option to open your current log view in Explore. This will allow you to continue your investigation in the Explore view. To do this, click the **Open in Explore** button.
18+

0 commit comments

Comments
 (0)