Home >Web Front-end >JS Tutorial >Grafana Opentelemetry Starter
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.
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.
The application sends it to port 4317 (grpc) or 4318 (http) using the OTLP protocol.
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.
Prometheus, Loki, and Tempo store signals in their respective storage.
Connect to Grafana at localhost:3000 and visualize the accumulated data through queries.
It is simple to key locally.
docker pull grafana/otel-lgtm
#!/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}
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...
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.
(You can check that ports 3000, 4317, and 4318 are open)
Let’s connect to localhost:3000.
You can log in as admin/admin.
The above is the detailed content of Grafana Opentelemetry Starter. For more information, please follow other related articles on the PHP Chinese website!