Grafana to otwartoźródłowe narzędzie do wizualizacji i analizy danych, które doskonale współpracuje z Prometheus, systemem monitorowania i alertów. W tym poradniku pokażemy, jak zainstalować Grafana i Prometheus na serwerze VPS z systemem Ubuntu 24.04.
Wymagania wstępne
- Serwer VPS z systemem Ubuntu 24.04
- Dostęp do konta root lub użytkownika z uprawnieniami sudo
Kroki instalacji
1. Aktualizacja systemu
Zaloguj się na swój serwer VPS i zaktualizuj system:
sudo apt update
sudo apt upgrade -y
2. Instalacja Prometheus
Pobierz i rozpakuj najnowszą wersję Prometheus:
wget https://github.com/prometheus/prometheus/releases/latest/download/prometheus-*.tar.gz
tar -xvzf prometheus-*.tar.gz
sudo mv prometheus-* /usr/local/prometheus
Utwórz użytkownika i grupę dla Prometheus:
sudo useradd --no-create-home --shell /bin/false prometheus
sudo usermod -aG prometheus prometheus
Ustaw odpowiednie uprawnienia:
sudo chown -R prometheus:prometheus /usr/local/prometheus
Utwórz plik konfiguracyjny Prometheus:
sudo nano /etc/prometheus/prometheus.yml
Wklej podstawową konfigurację (możesz ją dostosować do swoich potrzeb):
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
Utwórz plik jednostki systemd dla Prometheus:
sudo nano /etc/systemd/system/prometheus.service
Wklej następującą konfigurację:
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target
[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/prometheus/prometheus --config.file /etc/prometheus/prometheus.yml
[Install]
WantedBy=multi-user.target
Uruchom i włącz Prometheus:
sudo systemctl daemon-reload
sudo systemctl start prometheus
sudo systemctl enable prometheus
3. Instalacja Grafana
Dodaj repozytorium Grafana i zainstaluj Grafana:
sudo apt-get install -y software-properties-common
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
sudo apt update
sudo apt install grafana -y
Uruchom i włącz Grafana:
sudo systemctl start grafana-server
sudo systemctl enable grafana-server
4. Konfiguracja Grafana
Otwórz przeglądarkę internetową i wpisz adres IP swojego serwera, dodając port 3000 (np. http://twoj_adres_ip:3000). Zaloguj się domyślnymi danymi (admin/admin).
Dodaj Prometheus jako źródło danych. W sekcji "Configuration" wybierz "Data Sources", a następnie "Add data source". Wybierz "Prometheus" z listy i wprowadź adres URL Prometheus (domyślnie: http://localhost:9090).
Teraz możesz tworzyć dashboardy i wizualizacje, korzystając z danych zbieranych przez Prometheus.
Podsumowanie
Gratulacje! Udało Ci się zainstalować Grafana i Prometheus na swoim serwerze VPS z Ubuntu 24.04. Możesz teraz monitorować i analizować wydajność swojego systemu oraz 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