O SlideShare utiliza cookies para otimizar a funcionalidade e o desempenho do site, assim como para apresentar publicidade mais relevante aos nossos usuários. Se você continuar a navegar o site, você aceita o uso de cookies. Leia nosso Contrato do Usuário e nossa Política de Privacidade.
O SlideShare utiliza cookies para otimizar a funcionalidade e o desempenho do site, assim como para apresentar publicidade mais relevante aos nossos usuários. Se você continuar a utilizar o site, você aceita o uso de cookies. Leia nossa Política de Privacidade e nosso Contrato do Usuário para obter mais detalhes.
Server monitoring using Grafana
Grafana is an associate, open supply metric analytics suite which can be used on top of a variety of
different data stores. It is most commonly used for visualizing statistical knowledge for infrastructure and
application analytics, however, several use it in different domains together with industrial sensors, home
automation, weather, and process control.
Grafana help server monitoring by:
From heatmaps to histograms. Graphs to geomaps.
Grafana encompasses an inordinately of visualization choices to assist you in perceiving your knowledge,
Seamlessly outline alerts wherever it is sensible — whereas you’re within the knowledge. Grafana also
gets you notified via varied communication mediums like Slack, PagerDuty etc and also defines the
threshold in a visual format.
Grafana act as a platform to bring data from different sources and analyze each with others. Different
databases like Mysql, PostgreSQL, etc have different monitoring packages available in Grafana and also
can mix them together to better monitoring.
Prometheus is an open source computer code project written in Go, that real-time records the period of
time metrics in very statistic info designed employing a hypertext transfer protocol pull model, with
flexible queries and real-time alerting. Prometheus is not only a monitoring tool, but it also gives a
better view of some of its hardware. Very useful for analyzing capacity and performance reporting when
running into issues and use it for forecasting and increases in hardware.
Combination of Prometheus and Grafana
The combination of Prometheus and Grafana is changing into a lot of and a lot of common observance
stack used for storing and visualizing statistic knowledge. Prometheus acts because of the storage
backend and Grafana because of the interface for analysis and visualization. Prometheus collects metrics
from monitored targets by scraping metrics from the hypertext transfer protocol endpoints on these
In this blog, I am explaining about monitoring of basic system performance at its core level. Database
monitoring will explain in my next blog.
Install Grafana on Ubuntu 18.04 LTS
Use these terminal commands for Grafana stable version installation.
1) wget https://dl.grafana.com/oss/release/grafana_5.4.3_amd64.deb
2) sudo apt-get install -y adduser libfontconfig
3) sudo dpkg -i grafana_5.4.3_amd64.deb
To start Grafana service
4) systemctl daemon-reload
5) sudo service grafana-server start
To configure the Grafana server to start at boot time:
6) sudo update-rc.d grafana-server defaults
This will start the grafana-server process as the grafana user, which was created during the package
a) Grafana’s default running port is 3000 and default user and password is admin. (To access Grafana
b) Default login and password admin/ admin
Fig 1. Grafana Login Page
Fig 2. Grafana Home Page
Install Prometheus on Ubuntu 18.04 LTS
Use these terminal commands for Prometheus installation.
1) wget https://s3-eu-west-1.amazonaws.com/deb.robustperception.io/41EFC99D.gpg | apt-key add -
2) sudo apt-get update
3) sudo apt-get install prometheus prometheus-node-exporter prometheus-pushgateway
4) sudo service prometheus status
Fig 3. Prometheus Home Page
For our basic system monitoring, no more configurations required. The file “prometheus.yml” have
Create our First Grafana Dashboard
1) Goto Grafana Home page and click on: Create your First Data Source
Fig 4. New Data source page
This will start Prometheus on localhost:9090. Prometheus doesn't require any login credentials.
Fig 5.Prometheus Configuration
3) Enter Name and Basic Auth Details (Give grafana user name and password for Basic Auth Details).
The default settings enough for Prometheus. Save the information.
4) Find an Official & community built a dashboard from https://grafana.com/dashboards
for basic system monitoring, I am using CPU Utilization Details (Cores) [ID: 4151] custom dashboard.
Copy the dashboard ID from here.
2) Select Prometheus from the list. If it not present, search Prometheus on the search box.
Fig 6. CPU Utilization dashboard
5) To import the above dashboard to our Grafana, Go to manage the menu from Dashboard Icon:
Fig 7. Dashboard menus
6) Click Import Button
Fig 8. Dashboard Import page
7) Paste dashboard ID and load
Fig 9. Prometheus Import
8) Select system Prometheus instance and click Import. Now our first dashboard is ready to use. From the
dashboard, home selects the CPU Utilization dashboard. It will give a beautiful system monitoring UI.
Fig 10. Dashboard row
Fig 11. Core wise CPU utilization
If you want to customize the above dashboard or graph click the graph and edit Prometheus parameters.
Also, export the graph data to the CSV file.
Fig 12. Dashboard panel options
Fig 13. Panel query editor
Enjoy Grafans features and become a pro on server management.
Click here to read more about: Server monitoring using Grafana and Prometheus