Skip to content

Ubuntu 24.04'te Grafana ve Prometheus Kurulumu

Cloud Infrastructure Expert
Ubuntu 24.04'te Grafana ve Prometheus Kurulumu

 

 

Grafana ve Prometheus, metrikleri izlemek ve görselle?tirmek için güçlü araçlard?r. A?a??daki ad?mlar? izleyerek Ubuntu 24.04 çal??an VPS sunucunuza Grafana ve Prometheus’u kurun.

Ön Gereksinimler

  • Ubuntu 24.04 çal??an bir VPS sunucusu
  • Root veya sudo eri?imi
  • Temel komut sat?r? bilgisi

Ad?m 1: Sistemi Güncelleyin

Sisteminizin güncel oldu?undan emin olun:

sudo apt update && sudo apt upgrade -y

Ad?m 2: Prometheus’u Kurun

Öncelikle, Prometheus için bir kullan?c? olu?turun:

sudo useradd --no-create-home --shell /bin/false prometheus

Gerekli dizinleri olu?turun:

sudo mkdir /etc/prometheus
sudo mkdir /var/lib/prometheus

Prometheus’un en son sürümünü indirin:

wget https://github.com/prometheus/prometheus/releases/latest/download/prometheus-*.tar.gz

?ndirilen dosyay? ç?kar?n:

tar xvf prometheus-*.tar.gz

?kili dosyalar? uygun dizine ta??y?n:

sudo mv prometheus /usr/local/bin/
sudo mv promtool /usr/local/bin/

Yap?land?rma dosyas?n? ta??y?n ve izinleri ayarlay?n:

sudo mv prometheus.yml /etc/prometheus/
sudo chown -R prometheus:prometheus /etc/prometheus
sudo chown -R prometheus:prometheus /var/lib/prometheus

Ad?m 3: Prometheus için Bir Servis Dosyas? Olu?turun

Prometheus için bir servis dosyas? olu?turun:

sudo nano /etc/systemd/system/prometheus.service

A?a??daki içeri?i ekleyin:

[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target

[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/prometheus \
    --config.file /etc/prometheus/prometheus.yml \
    --storage.tsdb.path /var/lib/prometheus/ \
    --web.listen-address=:9090

[Install]
WantedBy=multi-user.target

Systemd daemon’? yeniden yükleyin ve Prometheus’u ba?lat?n:

sudo systemctl daemon-reload
sudo systemctl start prometheus
sudo systemctl enable prometheus

Ad?m 4: Grafana’y? Kurun

Grafana APT deposunu ekleyin:

sudo apt install -y software-properties-common
sudo add-apt-repository ppa:grafana/stable

Grafana’y? kurun:

sudo apt update
sudo apt install grafana

Grafana’y? ba?lat?n ve etkinle?tirin:

sudo systemctl start grafana-server
sudo systemctl enable grafana-server

Ad?m 5: Grafana’ya Eri?in

Web taray?c?n?z? aç?n ve http://your_domain.com:3000 adresine gidin. Varsay?lan giri? bilgileri:

  • Kullan?c? ad?: admin
  • Parola: admin

?lk giri?te parolay? de?i?tirmeniz istenecektir.

Ad?m 6: Prometheus’u Grafana’da Veri Kayna?? Olarak Yap?land?r?n

Grafana’ya giri? yapt?ktan sonra Ayarlar > Veri Kaynaklar? > Veri Kayna?? Ekle k?sm?na gidin ve Prometheus‘u seçin. A?a??daki URL’yi girin:

http://localhost:9090

Kaydet ve Test Et butonuna t?klayarak ba?lant?y? do?rulay?n.

Sonuç

Ubuntu 24.04 VPS sunucunuza Grafana ve Prometheus’u ba?ar?yla kurdunuz. Art?k uygulamalar?n?z? izlemeye ba?layabilirsiniz!

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Windows VPS Italia

Windows VPS Portugal

VPS Windows Italia

Windows VPS

Windows VPS

Windows VPS Sverige

Windows VPS Norge

Windows VPS

Windows VPS Türkiye

Windows RDS (Remote Desktop Services)

Windows VPS

Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.