How To Install Prometheus on Ubuntu 18.04



Prometheus is an excellent open-source monitoring system which allows us to collect metrics from our applications and stores them in a database, especially a time-series based DB. The biggest advantage of Prometheus is the query language it provides for data processing.

Using Prometheus

With Prometheus, we can not only export metric data related to itself like the count of requests it has received, the memory consumption etc, but we can extend the capabilities of Prometheus with exporters which are just additional programs that generate more metric data apart from Prometheus. In this lesson, we will make use of Node Exporter which is capable of producing and collecting metrics about a systems infrastructure which consists of the memory consumption, network statistics and related data.

Note that Nginx should be installed on your system before you can install the Prometheus and the Exporter as well. Read How to Install NGINX to do this.

Installing Prometheus

Prometheus has a Debian Package. To do this, import the package key into our machine:

GET | apt-key add

Once we run this command, we will see the following output:

Import Key for Prometheus

Finally, we’re ready to install all required packages in our system:

apt-get update
apt-get install prometheus prometheus-node-exporter prometheus-pushgateway prometheus-alertmanager

Note that updating apt packages can take few minutes to complete depending on the version of the libraries you’ve installed on your machine.

If you’re having trouble finding packages for Ubuntu, search in the Ubuntu package repository. Here is the sample output we see:

Prometheus Installation

This will also start the Prometheus server. You can confirm that the app is running by using this command:

service prometheus status

We see the following output:

Prometheus Status

Now, we can visit Prometheus dashboard and start playing with it on localhost:9090 port. This will show something like this:

Prometheus Running


In this lesson, we looked at how we can install Prometheus, an excellent tool for collection application Metrics. Read more Ubuntu based posts here.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

How to create a docker image?

How to create a docker image? Docker is a tool that is designed to benefit both developers and system administrators, making...

How to Change IP Address on Ubuntu

In this post we will try to change the IP address of a Ubuntu based Linux system from the command line. Though we will be...

Ubuntu MacOS Theme

The Mac OS interface can be replicated on Ubuntu, the terminal style, the icons and a whole lot more.So a little rundown...
Bài Viết

Bài Viết Mới Cập Nhật

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh

Mua proxy Onet uy tín tại

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1

Thuê địa chỉ IPv4 IPv6 trọn gói ở đâu chất lượng, giá RẺ nhất?