# Prometheus and Grafana

When the application is deployed to **production** , it is always necessary to monitor, monitor, and track system information ( **Logs, CPU, RAM, disks, IO operations,...** ) to determine the times and periods of impact. negatively affect the performance of the application. The purpose is to ensure that the application always operates stably.

### Prometheus​ <a href="#id-11-prometheus-1" id="id-11-prometheus-1"></a>

[**Prometheus**](https://prometheus.io/) is used to monitor the system through pre-installed daemons on nodes, thereby collecting necessary information.[ **Prometheus**](https://prometheus.io/) **communicates with the node via http/https** protocoland stores data in a **time-series database** (TSDB).

> _**Time series databases (TSDB) are databases that are stored according to timelines. This means that each data is always associated with a certain time point, thereby creating a time series of data, thereby allowing us to review data for a period of 1 hour or 1 hour.**_

<figure><img src="https://images.viblo.asia/a7d3c694-cfed-4346-aa03-a1c944bf13dc.png" alt=""><figcaption></figcaption></figure>

**Prometheus activities**

* **Prometheus** will perform the process of pulling parameters/metrics from jobs (exporters).
* **Prometheus** will store the collected data on the local server.
* **Prometheus** will run rules to process data as needed as well as check and implement the alerts you want.

### 1.2 Grafana <a href="#id-12-grafana-2" id="id-12-grafana-2"></a>

[**Grafana**](https://grafana.com/) is a vizualizer that displays metrics as charts or graphs, assembled into a highly customizable dashboard, making it easy to monitor node health. Simply for you to understand, after getting **the metrics** from the devices, **grafana** will use that metric to analyze and create a dashboard that visually depicts the metrics necessary for monitoring such as **CPU** , **RAM** , **disks** , **IO.** operations...

<figure><img src="https://images.viblo.asia/ed77afc5-9340-4d35-bfdc-c3f5fe8b823c.png" alt=""><figcaption><p><em><strong>Grafana dashboard</strong></em></p></figcaption></figure>
