{"id":5660,"date":"2018-07-20T15:04:25","date_gmt":"2018-07-20T11:04:25","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/ubuntu-grafana-monitoring\/"},"modified":"2018-07-20T15:04:25","modified_gmt":"2018-07-20T11:04:25","slug":"how-to-install-grafana-monitoring-tool-on-ubuntu-18-04-lts","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-grafana-monitoring-tool-on-ubuntu-18-04-lts\/","title":{"rendered":"How to Install Grafana Monitoring Tool on Ubuntu 18.04 LTS"},"content":{"rendered":"<p>Grafana is a free and open source enterprise-level monitoring and data visualization tool with support for Graphite, InfluxDB, Prometheus, Elasticsearch and many more databases. You can create your own dashboard to your own apps or infrastructure performance monitoring.<\/p>\n<p>In this tutorial, we will explain how to install Grafana on Ubuntu 18.04 LTS (Bionic Beaver).<\/p>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>A server running Ubuntu 16.04.<\/li>\n<li>N non-root user with sudo privileges.<\/li>\n<\/ul>\n<h2 id=\"install-grafana\">Install Grafana<\/h2>\n<p>By default, Grafana is not available in Ubuntu 18.04 default repository. So you will need to add Grafana repository to your system. You can add it using the following command:<\/p>\n<p class=\"command\">sudo nano \/etc\/apt\/sources.list<\/p>\n<p>Add the following line at the end of file:<\/p>\n<pre>deb https:\/\/packagecloud.io\/grafana\/stable\/debian\/ stretch main&#13;\n<\/pre>\n<p>Save and close the file, then add the GPG key with the following command:<\/p>\n<p class=\"command\">sudo curl https:\/\/packagecloud.io\/gpg.key | sudo apt-key add &#8211;<\/p>\n<p>Next, update the Grafana repository and install Grafana using the following command:<\/p>\n<p class=\"command\">sudo apt-get update -y<br \/>sudo apt-get install grafana -y<\/p>\n<p>Once the installation is completed successfully, you should see the following output:<\/p>\n<pre>Preparing to unpack ...\/grafana_5.1.3_amd64.deb ...&#13;\nUnpacking grafana (5.1.3) ...&#13;\nProcessing triggers for ureadahead (0.100.0-20) ...&#13;\nProcessing triggers for systemd (237-3ubuntu10) ...&#13;\nSetting up grafana (5.1.3) ...&#13;\nAdding system user `grafana' (UID 112) ...&#13;\nAdding new user `grafana' (UID 112) with group `grafana' ...&#13;\nNot creating home directory `\/usr\/share\/grafana'.&#13;\n### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd&#13; sudo \/bin\/systemctl daemon-reload&#13; sudo \/bin\/systemctl enable grafana-server&#13;\n### You can start grafana-server by executing&#13; sudo \/bin\/systemctl start grafana-server&#13;\nProcessing triggers for ureadahead (0.100.0-20) ...&#13;\nProcessing triggers for systemd (237-3ubuntu10) ...&#13;\n<\/pre>\n<p>Next, start Grafana server and enable it to start on boot time with the following command:<\/p>\n<p class=\"command\">sudo systemctl daemon-reload<br \/>sudo systemctl enable grafana-server<br \/>sudo systemctl start grafana-server<\/p>\n<p>Next, check the status of Grafana server using the following command:<\/p>\n<p class=\"command\">sudo systemctl status grafana-server<\/p>\n<p>Output:<\/p>\n<pre>? grafana-server.service - Grafana instance&#13; Loaded: loaded (\/usr\/lib\/systemd\/system\/grafana-server.service; disabled; vendor preset: enabled)&#13; Active: active (running) since Wed 2018-06-13 15:43:13 UTC; 11s ago&#13; Docs: http:\/\/docs.grafana.org&#13; Main PID: 19946 (grafana-server)&#13; Tasks: 8 (limit: 1114)&#13; CGroup: \/system.slice\/grafana-server.service&#13; ??19946 \/usr\/sbin\/grafana-server --config=\/etc\/grafana\/grafana.ini --pidfile=\/var\/run\/grafana\/grafana-server.pid cfg:default.paths.l&#13;\n&#13;\nJun 13 15:43:19 ubuntu1804 grafana-server[19946]: t=2018-06-13T15:43:19+0000 lvl=info msg=\"Executing migration\" logger=migrator id=\"create user&#13;\nJun 13 15:43:19 ubuntu1804 grafana-server[19946]: t=2018-06-13T15:43:19+0000 lvl=info msg=\"Executing migration\" logger=migrator id=\"create inde&#13;\nJun 13 15:43:19 ubuntu1804 grafana-server[19946]: t=2018-06-13T15:43:19+0000 lvl=info msg=\"Executing migration\" logger=migrator id=\"alter user_&#13;\nJun 13 15:43:19 ubuntu1804 grafana-server[19946]: t=2018-06-13T15:43:19+0000 lvl=info msg=\"Created default admin user: admin\"&#13;\nJun 13 15:43:19 ubuntu1804 grafana-server[19946]: t=2018-06-13T15:43:19+0000 lvl=info msg=\"Starting plugin search\" logger=plugins&#13;\nJun 13 15:43:19 ubuntu1804 grafana-server[19946]: t=2018-06-13T15:43:19+0000 lvl=info msg=\"Plugin dir created\" logger=plugins dir=\/var\/lib\/graf&#13;\nJun 13 15:43:19 ubuntu1804 grafana-server[19946]: t=2018-06-13T15:43:19+0000 lvl=info msg=\"Initializing Alerting\" logger=alerting.engine&#13;\nJun 13 15:43:19 ubuntu1804 grafana-server[19946]: t=2018-06-13T15:43:19+0000 lvl=info msg=\"Initializing CleanUpService\" logger=cleanup&#13;\nJun 13 15:43:20 ubuntu1804 grafana-server[19946]: t=2018-06-13T15:43:20+0000 lvl=info msg=\"Initializing Stream Manager\"&#13;\nJun 13 15:43:20 ubuntu1804 grafana-server[19946]: t=2018-06-13T15:43:20+0000 lvl=info msg=\"Initializing HTTP Server\" logger=http.server address&#13;\nlines 1-19\/19 (END)&#13;\n<\/pre>\n<h2 id=\"access-grafana\">Access Grafana<\/h2>\n<p>Grafana is now installed and configured, it&#8217;s time to access Grafana dashboard.<\/p>\n<p>Open your web browser and type the URL <strong>http:\/\/your-server-ip:3000<\/strong>, you will be redirected to the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_grafana_on_ubuntu_1804\/big\/page1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-install-grafana-monitoring-tool-on-ubuntu-18-04-lts.png\" alt=\"Grafana Login\" width=\"550\" height=\"286\" title=\"\"><\/a><\/p>\n<p>Now, provide your username as admin and password as admin, then click on the Log In button, you should see the Grafana dashboard in the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page2\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_grafana_on_ubuntu_1804\/big\/page2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-install-grafana-monitoring-tool-on-ubuntu-18-04-lts-2.png\" alt=\"Grafana Monitoring System\" width=\"550\" height=\"286\" title=\"\"><\/a><\/p>\n<h2 id=\"links\">Links<\/h2>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<p>\n<a href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-grafana-monitoring%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-install-grafana-monitoring-tool-on-ubuntu-18-04-lts-4.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-grafana-monitoring%2F&amp;text=How+to+Install+Grafana+Monitoring+Tool+on+Ubuntu+18.04+LTS&amp;via=howtoforgecom&amp;related=howtoforgecom\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-install-grafana-monitoring-tool-on-ubuntu-18-04-lts-6.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/howtoforgecom\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-install-grafana-monitoring-tool-on-ubuntu-18-04-lts-8.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-grafana-monitoring%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/07\/how-to-install-grafana-monitoring-tool-on-ubuntu-18-04-lts-9.png\" height=\"20\" alt=\"\" title=\"\"><\/a>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Grafana is a free and open source enterprise-level monitoring and data visualization tool with support for Graphite, InfluxDB, Prometheus, Elasticsearch and many more databases. You can create your own dashboard to your own apps or infrastructure performance monitoring. In this tutorial, we will explain how to install Grafana on Ubuntu 18.04 LTS (Bionic Beaver). Prerequisites &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-5660","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/5660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=5660"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/5660\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=5660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=5660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=5660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}