{"id":2070,"date":"2019-01-14T23:54:34","date_gmt":"2019-01-14T20:54:34","guid":{"rendered":"http:\/\/kifarunix.com\/?p=2070"},"modified":"2019-05-27T21:12:26","modified_gmt":"2019-05-27T18:12:26","slug":"install-grafana-metrics-monitoring-tool-on-debian-9","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-grafana-metrics-monitoring-tool-on-debian-9\/","title":{"rendered":"Install Grafana Metrics Monitoring Tool on Debian 9"},"content":{"rendered":"<p>Hello guys, we are at it again on how to install Grafana metrics monitoring tool on Debian 9. Our previous guide was on <a href=\"https:\/\/kifarunix.com\/install-grafana-data-visualization-tool-on-ubuntu-18-04\/\" target=\"_blank\" rel=\"noopener noreferrer\">installing Grafana Data monitoring tool on Ubuntu 18.04<\/a>. Well, as you already know, Grafana is an opensource time series data analytic and monitoring tool. Grafana provides beautiful graphing options for the collected system metrics. Among the database backends from which it can collect these metrics include Graphite, InfluxDB, Prometheus, Elasticsearch and several other <a href=\"http:\/\/docs.grafana.org\/features\/datasources\/\" target=\"_blank\" rel=\"noopener noreferrer\">data sources<\/a>.<\/p>\n<h2>Install Grafana Metrics Monitoring Tool on Debian 9<\/h2>\n<p>To install Grafana metrics monitoring tool on Debian 9, there are about three methods that you can use. These include;<\/p>\n<ul>\n<li>Installing Grafana using DEB file<\/li>\n<li>Installing Grafana from APT repository<\/li>\n<li>Installing Grafana from Archive file<\/li>\n<\/ul>\n<p>In this guide, we are going to look at how to install Grafana using the first two methods. Before you can opt for any of the methods, ensure that your system is upto-date.<\/p>\n<pre>apt update\napt upgrade<\/code><\/pre>\n<h3>Installing Grafana using DEB file<\/h3>\n<p>The Debian 9 default repositories does not contain Grafana package. In that case, we are going to download the DEB file for Grafana and install it as shown below;<\/p>\n<h4>Download Grafana DEB file<\/h4>\n<p>The Grafana DEB file can be grabbed using the command below.<\/p>\n<pre class=\" language-bash\"><code class=\" language-bash\"><span class=\"token function\">wget<\/span> https:\/\/dl.grafana.com\/oss\/release\/grafana_5.4.2_amd64.deb<\/code><\/pre>\n<h4>Install Grafana using DEB file<\/h4>\n<p>You can use any of the <code>apt<\/code>, <code>dpkg<\/code>, or <code>gdebi<\/code> package managers to install the Grafana DEB file.<\/p>\n<pre>sudo dpkg -i grafana_5.4.2_amd64.deb<\/code><\/pre>\n<pre>Selecting previously unselected package grafana.\n(Reading database ... 45800 files and directories currently installed.)\nPreparing to unpack grafana_5.4.2_amd64.deb ...\nUnpacking grafana (5.4.2) ...\nSetting up grafana (5.4.2) ...\nAdding system user `grafana' (UID 111) ...\nAdding new user `grafana' (UID 111) with group `grafana' ...\nNot creating home directory `\/usr\/share\/grafana'.\n### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd\n sudo \/bin\/systemctl daemon-reload\n sudo \/bin\/systemctl enable grafana-server\n### You can start grafana-server by executing\n sudo \/bin\/systemctl start grafana-server\nProcessing triggers for systemd (232-25+deb9u6) ...<\/code><\/pre>\n<h4>Installing Grafana from APT repository<\/h4>\n<p>In this case, we are going to create Grafana APT source list under <code>\/etc\/apt\/sources.list.d\/<\/code> and import the respective GPG APT key for singing Grafana packages. This can be done as shown below;<\/p>\n<pre>sudo vim \/etc\/apt\/sources.list.d\/grafana.list<\/code><\/pre>\n<pre class=\" language-bash\"><code class=\" language-bash\">deb https:\/\/packages.grafana.com\/oss\/deb stable main<\/code><\/pre>\n<p>Import Grafana GPG APT key<\/p>\n<pre class=\" language-bash\"><code class=\" language-bash\">curl https:\/\/packages.grafana.com\/gpg.key <span class=\"token operator\">|<\/span> <span class=\"token function\">sudo<\/span> apt-key add -\n<\/code><\/pre>\n<p>Update your Debian 9 packages<\/p>\n<pre>apt update<\/code><\/pre>\n<p>Install Grafana using the <code>apt<\/code> package manager. This is a sure bet method since it installs all the necessary dependencies.<\/p>\n<pre>apt install grafana<\/code><\/pre>\n<pre>Reading package lists... Done\nBuilding dependency tree       \nReading state information... Done\nThe following NEW packages will be installed:\n  grafana\n0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.\nNeed to get 55.4 MB of archives.\nAfter this operation, 159 MB of additional disk space will be used.\nGet:1 https:\/\/packages.grafana.com\/oss\/deb stable\/main amd64 grafana amd64 5.4.3 [55.4 MB]\nFetched 55.4 MB in 2min 2s (452 kB\/s)                                                                                                                         \ndebconf: unable to initialize frontend: Dialog\ndebconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)\ndebconf: falling back to frontend: Readline\nSelecting previously unselected package grafana.\n(Reading database ... 45814 files and directories currently installed.)\nPreparing to unpack ...\/grafana_5.4.3_amd64.deb ...\nUnpacking grafana (5.4.3) ...\nProcessing triggers for systemd (232-25+deb9u7) ...\nSetting up grafana (5.4.3) ...\n### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd\n sudo \/bin\/systemctl daemon-reload\n sudo \/bin\/systemctl enable grafana-server\n### You can start grafana-server by executing\n sudo \/bin\/systemctl start grafana-server\nProcessing triggers for systemd (232-25+deb9u7) ...<\/code><\/pre>\n<p>So either method gets you to the same destination. The choice is yours. If you however choose to got with the <code>dpkg<\/code> method, ensure that you got <code>adduser<\/code> and <code>libfontconfig<\/code> packages installed.<\/p>\n<pre>apt install adduser libfontconfig<\/code><\/pre>\n<p>So far so good, Grafana has been successfully installed. Want to install the latest version of Grafana (v6.2.1).<\/p>\n<p><a href=\"https:\/\/kifarunix.com\/install-grafana-6-2-x-on-ubuntu-18-04-debian-9\/\" target=\"_blank\" rel=\"noopener noreferrer\">Install Grafana 6.2.x on Ubuntu 18.04\/Debian 9<\/a><\/p>\n<p>The next thing is to access the Grafana Web dashboard. But before that, you need to open the Grafana TCP port 3000 on firewall to allow external access.<\/p>\n<pre>ufw allow 3000\/tcp<\/code><\/pre>\n<p>Start and enable Grafana to run when system reboots.<\/p>\n<pre>sudo systemctl daemon-reload\nsudo systemctl enable grafana-server\nsudo systemctl start grafana-server<\/code><\/pre>\n<p>You can verify that Grafana is now listening on TCP port 3000<\/p>\n<pre>ss -altnp | grep 3000\nLISTEN     0      128         :::3000                    :::*                   users:((\"grafana-server\",pid=8020,fd=6))<\/code><\/pre>\n<p>Next, Navigate to the browser and access Grafana using the URL <code>http:\/\/server-IP:3000<\/code>. This will take you the login page.<\/p>\n<p><a href=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-login-page-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2072 size-full\" src=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-login-page-1.png\" alt=\"Install Grafana Metrics Monitoring Tool on Debian 9\" width=\"1127\" height=\"709\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-login-page-1.png 1127w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-login-page-1-768x483.png 768w\" sizes=\"(max-width: 1127px) 100vw, 1127px\" \/><\/a><\/p>\n<p>To login, use the default credentials<br \/>\nusername: <code>admin<\/code><br \/>\npassword: <code>admin<\/code><\/p>\n<p>When you login with the default logins, you need to reset the admin password. Please do so and proceed to Grafana default dashboard.<\/p>\n<p><a href=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-reset-pass.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2073 size-full\" src=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-reset-pass.png\" alt=\"Install Grafana Metrics Monitoring Tool on Debian 9\" width=\"1104\" height=\"717\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-reset-pass.png 1104w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-reset-pass-768x499.png 768w\" sizes=\"(max-width: 1104px) 100vw, 1104px\" \/><\/a><\/p>\n<p>The default Grafana dashboard.<\/p>\n<p><a href=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-default-dashboard.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2064\" src=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-default-dashboard.png\" alt=\"Install Grafana Data Visualization Tool on Ubuntu 18.04\" width=\"1907\" height=\"819\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-default-dashboard.png 1907w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/01\/grafana-default-dashboard-768x330.png 768w\" sizes=\"(max-width: 1907px) 100vw, 1907px\" \/><\/a><\/p>\n<p>Magnificent!! That is all about how to install Grafana metrics monitoring tool on Debian 9. In our next guides, we will discuss how to collect system metrics using different data stores for monitoring. Stay connected, you are about to experience a whole new experience of system monitoring.<\/p>\n<p>Want to install TIG Stack, ELastic Stack or Graylog? Check our guides below;<\/p>\n<h3 class=\"entry-title td-module-title\"><a title=\"Install Elastic Stack 7 on Ubuntu 18.04\/Debian 9.8\" href=\"https:\/\/kifarunix.com\/install-elastic-stack-7-on-ubuntu-18-04-debian-9-8\/\" target=\"_blank\" rel=\"bookmark noopener noreferrer\">Install Elastic Stack 7 on Ubuntu 18.04\/Debian 9.8<\/a><\/h3>\n<h3 class=\"entry-title td-module-title\"><a title=\"Install Graylog 3.0 on CentOS 7\" href=\"https:\/\/kifarunix.com\/install-graylog-3-0-on-centos-7\/\" target=\"_blank\" rel=\"bookmark noopener noreferrer\">Install Graylog 3.0 on CentOS 7<\/a><\/h3>\n<h3 class=\"entry-title td-module-title\"><a title=\"Install and Setup TIG Stack on Fedora 30\" href=\"https:\/\/kifarunix.com\/install-and-setup-tig-stack-on-fedora-30\/\" target=\"_blank\" rel=\"bookmark noopener noreferrer\">Install and Setup TIG Stack on Fedora 30<\/a><\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Hello guys, we are at it again on how to install Grafana metrics monitoring tool on Debian 9. Our previous guide was on installing Grafana<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[301,72],"tags":[302,67],"class_list":["post-2070","post","type-post","status-publish","format-standard","hentry","category-grafana","category-monitoring","tag-grafana","tag-ubuntu-18-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2070"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=2070"}],"version-history":[{"count":3,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2070\/revisions"}],"predecessor-version":[{"id":3136,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2070\/revisions\/3136"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=2070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=2070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=2070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}