grafana - ghdrako/doc_snipets GitHub Wiki
$ docker volume create grafana-storage
|$ docker run -d --name=grafana -p 3000:3000 \
-v grafana-storage:/var/lib/grafana grafana/Grafana
Core Grafana stack
The core Grafana stack consists of Mimir, Loki, Tempo, and Grafana; the acronym LGTM is often used to refer to this tech stack.
- Mimir is a Time Series Database (TSDB) for the storage of metric data. It uses low-cost object storage such as S3, GCS, or Azure Blob Storage. Mimir is a fully Prometheus-compatible solution thataddresses the common scalability problems encountered with storing and searching huge quantities of metric data.
- Loki is a set of components that offer a full feature logging stack. Loki uses lower-cost object storage such as S3 or GCS, and only indexes label metadata.
- Tempo is a storage backend for high-scale distributed trace telemetry, with the aim of sampling 100% of the read path. Tempo also offers the ability to generate metrics from spans as they are ingested; these metrics can be written to any backend that supports Prometheus remote write.
- Grafana Agent is a collection of tools for collecting logs, metrics, and traces.There are many other collection tools that Grafana integrates well with.
- Grafana Faro is a JavaScript agent that can be added to frontend web applications. The project allows for real user monitoring (RUM) by collecting telemetry from a browser.
- k6 is a load testing tool that provides both a packaged tool
Connecting Grafana to a Data Source
version: ‘3’
services:
grafana:
image: “grafana/grafana:${GRAF_TAG-latest}”
ports:
- “3000:3000”
volumes:
- “${PWD-.}/grafana:/var/lib/grafana”
prometheus:
image: “prom/prometheus:${PROM_TAG-latest}”
ports:
- “9090:9090”
volumes:
- “${PWD-.}/prometheus:/etc/prometheus”
Dashboards
Plugins
Monitoring Linux
- https://grafana.com/docs/grafana-cloud/send-data/metrics/metrics-prometheus/prometheus-config-examples/docker-compose-linux/
- https://medium.com/@mefengl/unknown-title-95cb5a15ce83
- https://github.com/mefengl/example-monitoring
Monitoring Postgres
- https://blog.devgenius.io/how-to-setup-grafana-with-postgresql-database-using-docker-compose-a-step-by-step-guide-e5a9cce90ba3
- https://github.com/guedim/grafana-postgres/blob/master/Readme.md
- https://www.linkedin.com/pulse/data-driven-database-management-monitoring-postgresql-pankaj-salunkhe
- https://fatdba.com/2021/03/24/how-to-monitor-your-postgresql-database-using-grafana-prometheus-postgres_exporter/
JVM monitoring
- https://stl.tech/blog/monitor-jvm-metrics-in-a-cloud-native-environment/
- https://betterprogramming.pub/how-to-monitor-a-spring-boot-app-with-prometheus-and-grafana-22e2338f97fc
- https://wkrzywiec.medium.com/how-to-set-up-monitoring-tools-for-java-application-322d14c191e4
- https://medium.com/@KisharaBuddika/monitoring-jvm-metrics-using-grafana-elasticsearch-telegraf-a543b0bbdb8