{"id":39555,"date":"2021-11-10T12:30:00","date_gmt":"2021-11-10T18:30:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=39555"},"modified":"2022-06-03T03:31:29","modified_gmt":"2022-06-03T08:31:29","slug":"how-to-install-prometheus-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/","title":{"rendered":"How To Install Prometheus on Ubuntu 20.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"742\" height=\"372\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-prometheus-on-ubuntu-20.04.jpg\" alt=\"how to install prometheus on ubuntu 20.04\" class=\"wp-image-39594\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-prometheus-on-ubuntu-20.04.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-prometheus-on-ubuntu-20.04-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-prometheus-on-ubuntu-20.04-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/figure>\n\n\n\n<p>Prometheus is an open-source system and service monitoring and alerting tool used for recording real-time services and collecting metrics in a time-series database. It s written in Go and licensed under the Apache 2 License originally developed by SoundCloud.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installing-prometheus-on-ubuntu-20.04-1024x851.png?v=1635431147\" alt=\"installing prometheus on ubuntu 20.04\" class=\"wp-image-39595\" width=\"157\" height=\"130\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installing-prometheus-on-ubuntu-20.04-1024x851.png 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installing-prometheus-on-ubuntu-20.04-300x249.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installing-prometheus-on-ubuntu-20.04-150x125.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installing-prometheus-on-ubuntu-20.04-768x639.png 768w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installing-prometheus-on-ubuntu-20.04-1320x1098.png 1320w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installing-prometheus-on-ubuntu-20.04.png 1323w\" sizes=\"(max-width: 157px) 100vw, 157px\" \/><\/figure><\/div>\n\n\n\n<p>In this tutorial, we will show you how to install Prometheus on Ubuntu 20.04 server, which can be done easily if you follow it step by step.<\/p>\n\n\n\n<!--more-->\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69eb99a74b2a5\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69eb99a74b2a5\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#Requirements\" >Requirements:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#Step-1-Log-in-to-the-Server-Update-the-Server-OS-Packages\" >Step 1: Log in to the Server &amp; Update the Server OS Packages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#Step-2-Creating-Prometheus-System-Users-and-Directory\" >Step 2. Creating Prometheus System Users and Directory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#Step-3-Download-Prometheus-Binary-File\" >Step 3. Download Prometheus Binary File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#Step-4-Create-Prometheus-Configuration-file\" >Step 4: Create Prometheus Configuration file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#Step-5-Create-Prometheus-Systemd-Service-file\" >Step 5: Create Prometheus Systemd Service file<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-requirements\"><span class=\"ez-toc-section\" id=\"Requirements\"><\/span><strong>Requirements:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>For the purposes of this tutorial, we will use an Ubuntu20.04 VPS.<\/li><li>Access to the root user account (or a user with sudo privileges)<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-1-log-in-to-the-server-update-the-server-os-packages\"><span class=\"ez-toc-section\" id=\"Step-1-Log-in-to-the-Server-Update-the-Server-OS-Packages\"><\/span>Step 1: Log in to the Server &amp; Update the Server OS Packages<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>First, log in to your Ubuntu 20.04 server via SSH as the root user:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh root@IP_ADDRESS -p PORT_NUMBER<\/pre>\n\n\n\n<p>Don\u2019t forget to replace <strong>IP_Address<\/strong> and <strong>Port_Number<\/strong> with your server\u2019s actual IP address and the SSH port number. Also, you should replace \u2018root\u2019 with the username of the admin account if needed.<\/p>\n\n\n\n<p>Once you are in, run the following commands to update the package index and upgrade all installed packages to the latest available version<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-get update \napt-get upgrade<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-2-creating-prometheus-system-users-and-directory\"><span class=\"ez-toc-section\" id=\"Step-2-Creating-Prometheus-System-Users-and-Directory\"><\/span>Step 2. Creating Prometheus System Users and Directory<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The Prometheus server requires a service user account to run. You can name your user however you like, but we will create a user named <code>prometheus<\/code>. This user will be a system user (<code>-r<\/code>) who will be unable to get a shell (<code>-s \/bin\/false<\/code>)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">useradd --no-create-home -rs \/bin\/false prometheus<\/pre>\n\n\n\n<p>Also, we need to create directories for configuration files and other Prometheus data.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir \/etc\/prometheus\nmkdir \/var\/lib\/prometheus<\/pre>\n\n\n\n<p>Now we will have to update the group and user ownership on the newly created directories.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">chown prometheus:prometheus \/etc\/prometheus<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">chown prometheus:prometheus \/var\/lib\/prometheus<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-3-download-prometheus-binary-file\"><span class=\"ez-toc-section\" id=\"Step-3-Download-Prometheus-Binary-File\"><\/span>Step 3. Download Prometheus Binary File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Prometheus is included by default on the Ubuntu 20.04 repositories.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-cache policy prometheus<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">prometheus:\nInstalled: (none)\nCandidate: 2.15.2+ds-2\nVersion table:\n2.15.2+ds-2 500\n500 http:\/\/us.archive.ubuntu.com\/ubuntu focal\/universe amd64 Packages<\/pre>\n\n\n\n<p>However, the Prometheus release version provided by the default Ubuntu repositories may not be up-to-date. At the time of writing this article, the latest stable version of Prometheus is 2.30.3.<\/p>\n\n\n\n<p>But before downloading, visit the official Prometheus downloads page and check if there is a new version available.<\/p>\n\n\n\n<p>You can download it&nbsp; using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wget https:\/\/github.com\/prometheus\/prometheus\/releases\/download\/v2.30.3\/prometheus-2.30.3.linux-amd64.tar.gz<\/pre>\n\n\n\n<p>Once the tarball is downloaded, verify the tarball checksum with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sha256sum prometheus-2.30.3.linux-amd64.tar.gz<\/pre>\n\n\n\n<p>You should see an output that looks similar to the one below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">1ccd386d05f73a98b69aa5e0ed31fffac95cd9dadf7df1540daf2f182c5287e2 prometheus-2.30.3.linux-amd64.tar.gz<\/pre>\n\n\n\n<p>Compare the hash value from the above output to the checksum value on the Prometheus download page. If they match, that means the file\u2019s integrity is validated.<\/p>\n\n\n\n<p>Now you have successfully downloaded the Prometheus file and now you will extract it to the&nbsp; <strong><code>\/opt<\/code><\/strong> directory using the tar command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">tar xvzf prometheus-2.30.3.linux-amd64.tar.gz -C \/opt<\/pre>\n\n\n\n<p>Next, you need to copy the binary files to&nbsp; <code>\/usr\/local\/bin<\/code> directory and fix the permissions. This is done with the following&nbsp; commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mv \/opt\/prometheus-2.30.3.linux-amd64\/prometheus \/opt\/prometheus-2.30.3.linux-amd64\/promtool \/usr\/local\/bin\/\nchown prometheus:prometheus \/usr\/local\/bin\/prometheus \/usr\/local\/bin\/promtool\n<\/pre>\n\n\n\n<p>Also, we need to copy the&nbsp;<code>consoles<\/code>&nbsp;and&nbsp;<code>console_libraries<\/code>&nbsp;directories to Prometheus configuration directory,&nbsp;<code>\/etc\/prometheus<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mv \/opt\/prometheus-2.30.3.linux-amd64\/consoles \/opt\/prometheus-2.30.3.linux-amd64\/console_libraries \/etc\/prometheus\/\nchown -R prometheus:prometheus \/etc\/prometheus\/consoles \/etc\/prometheus\/console_libraries<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-4-create-prometheus-configuration-file\"><span class=\"ez-toc-section\" id=\"Step-4-Create-Prometheus-Configuration-file\"><\/span>Step 4: Create Prometheus Configuration file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Prometheus configuration file has been prepared and available on the extracted archive folder, and you need just to copy it to the Prometheus configuration <code>\/etc\/prometheus<\/code> directory.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mv \/opt\/prometheus-2.30.3.linux-amd64\/prometheus.yml \/etc\/prometheus\/prometheus.yml\nchown prometheus:prometheus \/etc\/prometheus\/prometheus.yml<\/pre>\n\n\n\n<p>The content of the<code>prometheus.yml<\/code> file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># my global config\nglobal:\nscrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.\nevaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.\n# scrape_timeout is set to the global default (10s).\n\n# Alertmanager configuration\nalerting:\nalertmanagers:\n- static_configs:\n- targets:\n# - alertmanager:9093\n\n# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.\nrule_files:\n# - \"first_rules.yml\"\n# - \"second_rules.yml\"\n\n# A scrape configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus itself.\nscrape_configs:\n# The job name is added as a label `job=&lt;job_name&gt;` to any timeseries scraped from this config.\n- job_name: \"prometheus\"\n\n# metrics_path defaults to '\/metrics'\n# scheme defaults to 'http'.\n\nstatic_configs:\n- targets: [\"localhost:9090\"]<\/pre>\n\n\n\n<p>The configuration is set up to scrape every 15 seconds and Prometheus listens on port <code>9090<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-5-create-prometheus-systemd-service-file\"><span class=\"ez-toc-section\" id=\"Step-5-Create-Prometheus-Systemd-Service-file\"><\/span>Step 5: Create Prometheus Systemd Service file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now we need to create a system service file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nano \/etc\/systemd\/system\/prometheus.service<\/pre>\n\n\n\n<p>In that file, add the following content:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[Unit]\nDescription=Prometheus\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=prometheus\nGroup=prometheus\nType=simple\nExecStart=\/usr\/local\/bin\/prometheus \\\n    --config.file \/etc\/prometheus\/prometheus.yml \\\n    --storage.tsdb.path \/var\/lib\/prometheus\/ \\\n    --web.console.templates=\/etc\/prometheus\/consoles \\\n    --web.console.libraries=\/etc\/prometheus\/console_libraries\n\n[Install]\nWantedBy=multi-user.target<\/pre>\n\n\n\n<p>After adding the content save and close the file.<\/p>\n\n\n\n<p>To use the newly created service you will have to reload the daemon services, Use the below command to reload daemon services.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl daemon-reload<\/pre>\n\n\n\n<p>You can now start and enable Prometheus service using the below commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl start prometheus<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl enable prometheus<\/pre>\n\n\n\n<p>To check and verify the status of your Prometheus service, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl status prometheus<\/pre>\n\n\n\n<p><strong>Output :<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u25cf prometheus.service - Prometheus\nLoaded: loaded (\/etc\/systemd\/system\/prometheus.service; enabled; vendor preset: enabled)\nActive: active (running) since Sat 2021-10-23 19:15:21 UTC; 4s ago\nMain PID: 9884 (prometheus)\nTasks: 1 (limit: 2245)\nMemory: 336.0K\nCGroup: \/system.slice\/prometheus.service\n\u2514\u25009884 \/usr\/local\/bin\/prometheus --config.file \/etc\/prometheus\/prometheus.yml --storage.tsdb.path \/var\/lib\/prometheus\/ --web.console.templates=\/etc\/prometheus\/consoles --web.console.libraries=\/etc\/prometheus\/console_libraries<\/pre>\n\n\n\n<p>Prometheus installation and configuration is set up, You can see status Active: &nbsp;active(running)<\/p>\n\n\n\n<p>Now Prometheus service is up and running and you can access it from any web browser.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/Your_server_IP:9090<\/pre>\n\n\n\n<figure class=\"wp-block-image alignnone size-full wp-image-223\"><img decoding=\"async\" width=\"1024\" height=\"291\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installation-of-prometheus-on-ubuntu-20.04.jpg\" alt=\"installation of prometheus on ubuntu 20.04\" class=\"wp-image-39596\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installation-of-prometheus-on-ubuntu-20.04.jpg 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installation-of-prometheus-on-ubuntu-20.04-300x85.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installation-of-prometheus-on-ubuntu-20.04-150x43.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installation-of-prometheus-on-ubuntu-20.04-768x218.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>The Prometheus main page.<\/figcaption><\/figure>\n\n\n\n<p>To check the status of your node, go to <strong>Status<\/strong> &gt; <strong>Targets<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image alignnone size-full wp-image-226\"><img decoding=\"async\" width=\"1024\" height=\"292\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-set-up-prometheus-on-ubuntu-20.04.jpg\" alt=\"how to set up prometheus on ubuntu 20.04\" class=\"wp-image-39597\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-set-up-prometheus-on-ubuntu-20.04.jpg 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-set-up-prometheus-on-ubuntu-20.04-300x86.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-set-up-prometheus-on-ubuntu-20.04-150x43.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-set-up-prometheus-on-ubuntu-20.04-768x219.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>The Prometheus Status &gt; Targets page<\/figcaption><\/figure>\n\n\n\n<p>That\u2019s it! The installation of Prometheus on Ubuntu 20.04 has been completed.<\/p>\n\n\n\n<p>Of course, you don\u2019t need to install Prometheus on Ubuntu 20.04 yourself if you use one of our fully managed <a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Linux<\/strong> <strong>VPS Hosting<\/strong><\/a> services, in which case you can simply ask our expert Linux admins to install it for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n\n\n\n<p>P.S. If you liked this post on how to install Prometheus on Ubuntu 20.04 please share it with your friends on the social networks by using the share shortcuts below, or simply leave a comment in the comments section. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prometheus is an open-source system and service monitoring and alerting tool used for recording real-time services and collecting metrics in &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How To Install Prometheus on Ubuntu 20.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#more-39555\" aria-label=\"Read more about How To Install Prometheus on Ubuntu 20.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":39594,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1698],"tags":[1603,1961,1839],"class_list":["post-39555","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-ubuntu","tag-how-to-install","tag-prometheus","tag-ubuntu-20-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install Prometheus on Ubuntu 20.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"Learn how to install Prometheus on Ubuntu 20.04 with this easy guide. It&#039;s easy to install Prometheus on Ubuntu.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Prometheus on Ubuntu 20.04 | RoseHosting\" \/>\n<meta property=\"og:description\" content=\"Learn how to install Prometheus on Ubuntu 20.04 with this easy guide. It&#039;s easy to install Prometheus on Ubuntu.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-10T18:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:31:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-prometheus-on-ubuntu-20.04.jpg?v=1635430902\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Install Prometheus on Ubuntu 20.04 | RoseHosting\" \/>\n<meta name=\"twitter:description\" content=\"Learn how to install Prometheus on Ubuntu 20.04 with this easy guide. It&#039;s easy to install Prometheus on Ubuntu.\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How To Install Prometheus on Ubuntu 20.04\",\"datePublished\":\"2021-11-10T18:30:00+00:00\",\"dateModified\":\"2022-06-03T08:31:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/\"},\"wordCount\":725,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/how-to-install-prometheus-on-ubuntu-20.04.jpg\",\"keywords\":[\"how to install\",\"prometheus\",\"Ubuntu 20.04\"],\"articleSection\":[\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/\",\"name\":\"How to Install Prometheus on Ubuntu 20.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/how-to-install-prometheus-on-ubuntu-20.04.jpg\",\"datePublished\":\"2021-11-10T18:30:00+00:00\",\"dateModified\":\"2022-06-03T08:31:29+00:00\",\"description\":\"Learn how to install Prometheus on Ubuntu 20.04 with this easy guide. It's easy to install Prometheus on Ubuntu.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/how-to-install-prometheus-on-ubuntu-20.04.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/how-to-install-prometheus-on-ubuntu-20.04.jpg\",\"width\":742,\"height\":372,\"caption\":\"how to install prometheus on ubuntu 20.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-prometheus-on-ubuntu-20-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Install Prometheus on Ubuntu 20.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install Prometheus on Ubuntu 20.04 | RoseHosting","description":"Learn how to install Prometheus on Ubuntu 20.04 with this easy guide. It's easy to install Prometheus on Ubuntu.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Prometheus on Ubuntu 20.04 | RoseHosting","og_description":"Learn how to install Prometheus on Ubuntu 20.04 with this easy guide. It's easy to install Prometheus on Ubuntu.","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2021-11-10T18:30:00+00:00","article_modified_time":"2022-06-03T08:31:29+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-prometheus-on-ubuntu-20.04.jpg?v=1635430902","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_title":"How to Install Prometheus on Ubuntu 20.04 | RoseHosting","twitter_description":"Learn how to install Prometheus on Ubuntu 20.04 with this easy guide. It's easy to install Prometheus on Ubuntu.","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How To Install Prometheus on Ubuntu 20.04","datePublished":"2021-11-10T18:30:00+00:00","dateModified":"2022-06-03T08:31:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/"},"wordCount":725,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-prometheus-on-ubuntu-20.04.jpg","keywords":["how to install","prometheus","Ubuntu 20.04"],"articleSection":["Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/","name":"How to Install Prometheus on Ubuntu 20.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-prometheus-on-ubuntu-20.04.jpg","datePublished":"2021-11-10T18:30:00+00:00","dateModified":"2022-06-03T08:31:29+00:00","description":"Learn how to install Prometheus on Ubuntu 20.04 with this easy guide. It's easy to install Prometheus on Ubuntu.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-prometheus-on-ubuntu-20.04.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-prometheus-on-ubuntu-20.04.jpg","width":742,"height":372,"caption":"how to install prometheus on ubuntu 20.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-prometheus-on-ubuntu-20-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Install Prometheus on Ubuntu 20.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/39555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=39555"}],"version-history":[{"count":4,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/39555\/revisions"}],"predecessor-version":[{"id":39598,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/39555\/revisions\/39598"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/39594"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=39555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=39555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=39555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}