Tutorial ini menjelaskan step by step instalasi Prometheus Server di CentOS 7. Komponen Prometheus Server ini bertugas melakukan scraping data monitoring yang di-expose oleh target host dan menyimpan data tersebut dalam bentuk time series.
Kebutuhan
Instalasi
Versi Prometheus Server yang digunakan dalam tutorial ini adalah v2.3.1. Download paket Prometheus Server:
cd /opt
wget https://github.com/prometheus/prometheus/releases/download/v2.3.1/prometheus-2.3.1.linux-amd64.tar.gz
Uncompress paket Prometheus Server:
tar xvfz prometheus-2.3.1.linux-amd64.tar.gz
cd prometheus-2.3.1.linux-amd64
Cek versi Prometheus Server
./prometheus --version
Buat file dengan nama config.yml
:
vi config.yml
|
|
Jalankan Prometheus Server dengan perintah berikut:
./prometheus --config.file=config.yml
Buka browser dan akses url berikut:
Prometheus Server Dashboard:



Running Prometheus Server as a Service:
vi /etc/systemd/system/prometheus_server.service
|
|
Start Prometheus Server service:
systemctl daemon-reload
systemctl enable prometheus_server.service
systemctl start prometheus_server.service
systemctl status prometheus_server.service
journalctl -u prometheus_server