Home > Web Front-end > JS Tutorial > body text

Grafana Opentelemetry Starter

WBOY
Release: 2024-08-19 17:03:06
Original
554 people have browsed it

Grafana Hotel LGTM

I want to view server logs and traces with Grafana, but when I look for them, they all tell me to just set up a configuration file and launch a node in Kubernates, so there is a starter for people who don't feel like giving up.

grafana-otel-lgtm allows you to easily launch Loki, Grafana, Tempo, and Mimir locally without any configuration.

Overview of Grafana Otel LGTM

grafana/otel-lgtm Docker image comes with OpenTelemetry Collector, Prometheus, Loki, Tempo, and Grafana preset as default settings.

It is easy to understand if you look at the picture below.

Grafana Opentelemetry Starter

Flow as seen in the picture

1

The application sends it to port 4317 (grpc) or 4318 (http) using the OTLP protocol.

2

The Opentelemetry Collector is listening to the port, collects it, and transmits it to Prometheus for Metric, Loki for Log, and Tempo for Trace depending on the type of signal.

3

Prometheus, Loki, and Tempo store signals in their respective storage.

4

Connect to Grafana at localhost:3000 and visualize the accumulated data through queries.

How to set up

It is simple to key locally.

1. Pull docker image

docker pull grafana/otel-lgtm
Copy after login

2. Run run script

Write and run the run-lgtm.sh script.
#!/bin/bash

RELEASE=${1:-latest}

docker run \
  --name lgtm \
  -p 3000:3000 \
  -p 4317:4317 \
  -p 4318:4318 \
  --rm \
  -ti \
  -v $PWD/container/grafana:/data/grafana \
  -v $PWD/container/prometheus:/data/prometheus \
  -v $PWD/container/loki:/loki \
  -e GF_PATHS_DATA=/data/grafana \
  docker.io/grafana/otel-lgtm:${RELEASE}
Copy after login
execution result
sh run-lgtm.sh
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Waiting for the OpenTelemetry collector and the Grafana LGTM stack to start up...
Copy after login

When I run it on an Apple silicon MacBook, the above warning appears, but it is not a big deal since I will be using it locally for testing.

Docker execution screen

Grafana Opentelemetry Starter

(You can check that ports 3000, 4317, and 4318 are open)

Grafana login screen

Let’s connect to localhost:3000.

You can log in as admin/admin.

Grafana Opentelemetry Starter

The above is the detailed content of Grafana Opentelemetry Starter. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template