Monitoring#
Overview#
The Monitoring component is composed of Prometheus and Grafana.
Prometheus is responsible for collecting and storing metrics from the Carbonio infrastructure, while Grafana provides dashboards for visualization and monitoring.
Some repository configuration steps may require manual interaction before and after installation, depending on the deployment scenario.
This component enables administrators to monitor system health, performance metrics, and service availability across the entire Carbonio environment.
Packages#
The following packages are required for the Monitoring component:
carbonio-prometheus
Note
Alerting can be enabled in a Carbonio infrastructure by installing the
carbonio-prometheus-alertmanager package either on the same node that
hosts Prometheus or on a different node.
When combined with Prometheus, Alertmanager allows administrators to define alert rules, evaluate them against metrics, and receive notifications through multiple channels (for example email or Telegram).
Detailed, step-by-step instructions on how to configure and enable alerting with Prometheus and Alertmanager in Carbonio are available in the dedicated how-to guide: Enable Alerting with Prometheus and Alertmanager
Grafana Installation and Configuration#
As mentioned above, Grafana requires some manual interaction before and after the installation to configure the data sources and import them from Carbonio.
Grafana Installation#
Before installing Grafana, download the Grafana GPG key, add it to your APT installation’s list of trusted keys and put the Grafana repository to your APT sources.
# wget -q -O - https://packages.grafana.com/gpg.key | \
gpg --dearmor | sudo tee /usr/share/keyrings/grafana.gpg > \
/dev/null
# echo "deb [signed-by=/usr/share/keyrings/grafana.gpg] \
https://packages.grafana.com/oss/deb stable main" | sudo \
tee -a /etc/apt/sources.list.d/grafana.list
# wget -q -O - https://packages.grafana.com/gpg.key | \
gpg --dearmor | sudo tee /usr/share/keyrings/grafana.gpg > \
/dev/null
# echo "deb [signed-by=/usr/share/keyrings/grafana.gpg] \
https://packages.grafana.com/oss/deb stable main" | sudo \
tee -a /etc/apt/sources.list.d/grafana.list
# wget -q -O gpg.key https://rpm.grafana.com/gpg.key
# rpm --import gpg.key
Create file /etc/yum.repos.d/grafana.repo with the
following content:
[grafana]
name=grafana
baseurl=https://rpm.grafana.com
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://rpm.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
# wget -q -O gpg.key https://rpm.grafana.com/gpg.key
# rpm --import gpg.key
Create file /etc/yum.repos.d/grafana.repo with the
following content:
[grafana]
name=grafana
baseurl=https://rpm.grafana.com
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://rpm.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
Install Grafana packages.
# apt update
# apt install grafana
# apt update
# apt install grafana
# dnf install grafana
# dnf install grafana
Start Grafana service and check Grafana status. If everything is work correctly, you can enable the service to automatically start Grafana on boot.
# systemctl start grafana-server
# systemctl status grafana-server
# systemctl enable grafana-server
Log in to Grafana#
The Grafana portal can be reached on port 3000 of the node on which you installed the Monitoring Component, we assume it is called http://srvmon.example.com:3000/.
You can log in for the first time with these credentials: user =
admin / password = admin
Hint
After the first login don’t forget to change the password for the account.
Grafana datasource config#
Open the Grafana web interface at http://srvmon.example.com:3000/
Log in to Grafana using your credentials
In the left sidebar, click Connections, then select Data Sources
Click Add new data source
-
Choose Prometheus as the type. In the list of available data sources, find and select “Prometheus” and and enter a name
Hint
To prevent conflicts in the future, use a meningful name, for example carbonio-prometheus.
Configure Prometheus connection. Fill in the required fields for Prometheus, including the URL for your Prometheus server (e.g., http://localhost:9090).
Click the “Save & Test” button to verify that the Prometheus connection was configured correctly. If the connection is successful, save the data source.
Import Dashboards#
A dashboard in Grafana is a visual representation of data designed to provide a comprehensive and real-time overview of various metrics and information. Dashboards are customizable and can contain panels that display graphs, tables, heatmaps, and other visualizations based on the data queried from connected data sources. The Zextras Team has prepares some specific dashboards necessary for comfortable monitoring, that can be easily imported from the Grafana marketplace as follows.
Access the Grafana web interface
In the left sidebar, select “Dashboards”
Click “New” → “Import“ to open the import page.
Paste the dashboard ID you want to import.
Click “Load” to have the system retrieve information about the dashboard.
If necessary, configure import parameters such as selecting a data source and other options.
Click “Import” to complete the import process.
After a successful import, go to the “Dashboards” section and select the imported dashboard to view it.
These steps will allow you to quickly import a dashboard into Grafana using its unique ID.
Dashboard |
Description |
ID |
|---|---|---|
Node Exporter Full |
Standard dashboard |
1860 |
Carbonio MTA queues |
Information about MTA queues: statuses, size |
20029 |
Carbonio Mailbox |
Information about the mailbox like load, protocols, counters and db |
20027 |
NGINX exporter |
Standard dashboard from Grafana |
12708 |
Carbonio Service Discover status |
Contains data about infrastructure, servers and services in the consul, allows you to monitor the health of servers and services. |
20032 |
Carbonio PostgreSQL |
Based on Grafana “PostgreSQL Database” dashboard. Fixed dashboard |
20030 |
Carbonio Processes |
Contains a memory and cpu map panel which shows latest resident memory and cpu map , it’s helpful to check top processes that consume a lot of memory and CPU immediately, also includes the information from node exporters and about processes |
20034 |
Carbonio MariaDB |
MariaDB Overview Innodb, I/O, Waits, Connections and so on |
20061 |
RabbitMQ-Overview |
The RabbitMQ-Overview dashboard uses the prometheus data source to create a Grafana dashboard with the graph and singlestat panels. This is a standard Grafana Labs solution. |
17103 |