Grafana i Prometheus to pot??ne narz?dzia do monitorowania i wizualizacji metryk. Post?puj zgodnie z tymi krokami, aby zainstalowa? Grafana i Prometheus na swoim serwerze VPS dzia?aj?cym na Ubuntu 24.04.

Wymagania wst?pne

  • Serwer VPS dzia?aj?cy na Ubuntu 24.04
  • Dost?p root lub sudo
  • Podstawowa wiedza o wierszu polece?

Krok 1: Zaktualizuj system

Upewnij si?, ?e Twój system jest aktualny:

sudo apt update && sudo apt upgrade -y

Krok 2: Zainstaluj Prometheus

Najpierw utwórz u?ytkownika dla Prometheus:

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

Utwórz wymagane katalogi:

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

Pobierz najnowsz? wersj? Prometheus:

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

Rozpakuj pobrany plik:

tar xvf prometheus-*.tar.gz

Przenie? pliki binarne do odpowiedniego katalogu:

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

Przenie? plik konfiguracyjny i ustaw odpowiednie uprawnienia:

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

Krok 3: Utwórz plik us?ugi dla Prometheus

Utwórz plik us?ugi dla Prometheus:

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

Dodaj nast?puj?c? zawarto??:

[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

Za?aduj ponownie demon systemd i uruchom Prometheus:

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

Krok 4: Zainstaluj Grafana

Dodaj repozytorium APT dla Grafana:

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

Zainstaluj Grafana:

sudo apt update
sudo apt install grafana

Uruchom i w??cz Grafana:

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

Krok 5: Uzyskaj dost?p do Grafana

Otwórz przegl?dark? internetow? i przejd? do http://your_domain.com:3000. Domy?lne dane logowania to:

  • Nazwa u?ytkownika: admin
  • Has?o: admin

Przy pierwszym logowaniu zostaniesz poproszony o zmian? has?a.

Krok 6: Skonfiguruj Prometheus jako ?ród?o danych w Grafana

Po zalogowaniu si? do Grafana, przejd? do Konfiguracja > ?ród?a danych > Dodaj ?ród?o danych i wybierz Prometheus. Wprowad? adres URL:

http://localhost:9090

Kliknij Zapisz i przetestuj, aby zweryfikowa? po??czenie.

Podsumowanie

Pomy?lnie zainstalowa?e? Grafana i Prometheus na swoim serwerze VPS dzia?aj?cym na Ubuntu 24.04. Teraz mo?esz rozpocz?? monitorowanie swoich aplikacji!

Windows VPS

Windows VPS UK

Windows VPS

VPS Windows

Serwer VPS Windows

VPS Windows Deutschland

Windows VPS Hosting

VPS Windows España

Windows VPS Nederland

VPS Windows Italia

VPS Windows Portugal

VPS Windows ??????

VPS Windows ???????

VPS Windows ??

VPS Windows Sverige

VPS Windows Norge

VPS Windows ????

VPS Windows Türkiye

Remote Desktop Services (RDS)

RDS CAL (Client Access License)

Remote Desktop VPS

Keywords: windows vps uk, windows vps, uk windows vps, windows vps hosting uk, vps windows server, uk vps windows, vps windows, servidor vps windows, vps uk windows, vps with windows, virtual private server windows, windows virtual private server, windows vps server uk, vps for windows, servidores vps windows, vps windows uk, windows vps hosting, vps windows hosting, windows vps server, windows virtual private servers, vps on windows, vps windows servers, cheap windows vps uk, windowsvps, windows desktop vps, buy vps windows, windows server vps, windows 10 vps uk, rds services, rds cal, remote desktop services, remote desktop hosting

#windowsvps #vpshosting #ukvps #virtualserver #windowsvpsuk #vpsserver #hostingvps #cloudvps #windowsvpshosting #cheapvps #vpswithwindows #windowsserver #servervps #vpssolutions #vpswindows #rdscal #remotedesktop #remotedesktopvps #rds #windowsrds

vps windows