You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note : Baca setiap langkah dengan seksama, semua perintah dapat langsung disalin dan dijalankan pada server tanpa perlu copy satu per satu tiap perintah
Edit file promtheus.yml untuk menambahkan target metrics Node Exporter
sudo nano /etc/prometheus/prometheus.yml
Salin teks berikut lalu simpan
global:
scrape_interval: 5s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.# scrape_timeout is set to the global default (10s).# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"# - "second_rules.yml"
scrape_configs:
# Job untuk target Prometheus itu sendiri
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
# Job untuk target Node Exporter
- job_name: node
static_configs:
- targets: ["localhost:9100"]
Setelah semua service dan file serta folder yang diperlukan telah dibuat, selanjutnya adalah menjalankan service Promtheus dan Node Exporter