gwift-book/annexes/grafana.tex

72 lines
3.9 KiB
TeX
Executable File

\chapter{Monitoring Stack}
InfluxDB ? https://www.influxdata.com/
\section{Visualisation}
\begin{quote}
Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored.
Create, explore, and share beautiful dashboards with your team and foster a data driven culture.
\end{quote}
\section{Métriques}
\begin{quote}
Graphite is an enterprise-ready monitoring tool that runs equally well on cheap hardware or Cloud infrastructure.
Teams use Graphite to track the performance of their websites, applications, business services, and networked servers.
It marked the start of a new generation of monitoring tools, making it easier than ever to store, retrieve, share, and visualize time-series data.
Graphite was originally designed and written by Chris Davis at Orbitz in 2006 as side project that ultimately grew to be their foundational monitoring tool.
In 2008, Orbitz allowed Graphite to be released under the open source Apache 2.0 license.
Numerous large companies have deployed Graphite to production where it helps them to monitor their production e-commerce services and plan for growth.
\end{quote}
Graphite does two things:
\begin{enumerate}
\item
Store numeric time-series data
\item
Render graphs of this data on demand
\end{enumerate}
What Graphite does not do is collect data for you, however there are some tools out there that know how to send data to graphite. Even though it often requires a little code, sending data to Graphite is very simple.
Graphite consists of 3 software components:
\begin{enumerate}
\item
\textbf{carbon} - a Twisted daemon that listens for time-series data
\item
\textbf{whisper} - a simple database library for storing time-series data (similar in design to RRD)
\item
\textbf{graphite webapp} - A Django webapp that renders graphs on-demand using Cairo
\end{enumerate}
Feeding in your data is pretty easy, typically most of the effort is in collecting the data to begin with. As you send datapoints to Carbon, they become immediately available for graphing in the webapp. The webapp offers several ways to create and display graphs including a simple URL API for rendering that makes it easy to embed graphs in other webpages.
\section{Logs}
\begin{quote}
Loki brings together logs from all your applications and infrastructure in a single place.
By using the exact same service discovery and label model as Prometheus, Grafana Logs can systematically guarantee your logs have consistent metadata with your metrics, making it easy to move from one to the other.
\end{quote}
Loki est l'équivalent (développé directement par Grafana) de Prometheus.
Il sera donc toujours nécessaire d'accumuler des logs au travers d'exporters.
\begin{quote}
Loki se comporte comme Prometheus : c'est un logiciel que vous allez installer sur votre machine qui sert pour le monitoring de votre infrastructure et le laisser vivre sa vie. Comme son mentor, ou presque, il va falloir lui associer des exporters pour le gaver de données : Promtail.
-- https://www.dadall.info/article698/loki-jouer-avec-ses-logs-dans-grafana
\end{quote}
\section{Traces}
Unlike other tracing tools, Grafana Traces does not index the traces which makes it possible to store orders of magnitude more trace data for the same cost, and removes the need for sampling.
Stores orders of magnitude more trace data for the same cost, and removes the need for sampling.
Reduces the TCO by an order of magnitude and makes the system overall much easier to use.
Grafana Traces is available as a containerized application, and you can run it on any orchestration engine like Kubernetes, Mesos, etc. The various services can be horizontally scaled depending on the workload on the ingest/query path. You can also use cloud native object storage, such as Google Cloud Storage, Amazon S3, or Azure Blob Storage.