Cara Menyiapkan Prometheus Pada Linux

Panduan Buat user prometheus sudo useradd --no-create-home --shell /bin/false prometheus Unduh dan pasang prometheus wget https://github.com/prometheus/prometheus/releases/download/v2.30.0/prometheus-2.30.0.linux-amd64.tar.gz tar xf prometheus-2.30.0.linux-amd64.tar.gz sudo cp prometheus-2.30.0.linux-amd64/prometheus /usr/local/bin/prometheus Buat konfigurasi prometheus sudo mkdir /etc/prometheus sudo bash -c 'cat <<EOF > /etc/prometheus/prometheus.yml global: scrape_interval: 15s evaluation_interval: 15s scrape_configs: - job_name: 'prometheus' static_configs: - targets: - localhost:9090 EOF' Buat file systemd untuk prometheus sudo mkdir /var/lib/prometheus sudo chown prometheus:prometheus /var/lib/prometheus sudo bash -c 'cat<<EOF > /etc/systemd/system/prometheus....

September 18, 2021 · 1 min · Aji Arya