O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Server monitoring using grafana and prometheus

79 visualizações

Publicada em

This blog defines how grafana and Prometheus be used in monitoring the basic system performance at its core level.

Publicada em: Negócios
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Server monitoring using grafana and prometheus

  1. 1. Server monitoring using Grafana and Prometheus www.cybrosys.com
  2. 2. INTRODUCTION 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: Visualize From heatmaps to histograms. Graphs to geomaps. Grafana encompasses an inordinately of visualization choices to assist you in perceiving your knowledge, beautifully. Alert 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. Unify 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.
  3. 3. Prometheus 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 targets. In this blog, I am explaining about monitoring of basic system performance at its core level. Database monitoring will explain in my next blog.
  4. 4. 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 installation. a) Grafana’s default running port is 3000 and default user and password is admin. (To access Grafana goto: http://localhost:3000 b) Default login and password admin/ admin
  5. 5. 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 prometheus-alertmanager 4) sudo service prometheus status
  6. 6. Fig 3. Prometheus Home Page For our basic system monitoring, no more configurations required. The file “prometheus.yml” have built-in configurations. 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.
  7. 7. 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.
  8. 8. 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
  9. 9. 6) Click Import Button Fig 8. Dashboard Import page 7) Paste dashboard ID and load Fig 9. Prometheus Import
  10. 10. 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
  11. 11. 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.
  12. 12. Click here to read more about: Server monitoring using Grafana and Prometheus
  13. 13. Cybrosys Technologies Pvt. Ltd. 1st Floor, Thapasya Building, Infopark, Kakkanad, Kochi, Kerala, India-682030. Cybrosys Technologies Pvt. Ltd. 1st Floor, Thapasya Building, Infopark, Kakkanad, Kochi, Kerala, India-682030. Cybrosys Technologies Pvt. Ltd. Neospace, Kinfra Techno Park, Kakkancherry, Calicut University P.O. Calicut Kerala, India - 673635. Cybrosys Ltd Cybrosys Limited Alpha House, 100 Borough High Street, London, Greater London, SE1 1LB, United Kingdom Thank You ! Cybrosys Technologies Pvt. Ltd. 1st Floor, Thapasya Building, Infopark, Kakkanad, Kochi, India - 682030.

×