Sådan installeres Grafana og Prometheus på Ubuntu 24.04

 

 

Grafana og Prometheus er kraftfulde værktøjer til overvågning og visualisering af metrikker. Følg disse trin for at installere Grafana og Prometheus på din VPS-server, der kører Ubuntu 24.04.

Forudsætninger

  • En VPS-server, der kører Ubuntu 24.04
  • Root- eller sudo-adgang
  • Grundlæggende kendskab til kommandolinjen

Trin 1: Opdater dit system

Sørg for, at dit system er opdateret:

sudo apt update && sudo apt upgrade -y

Trin 2: Installer Prometheus

Opret først en bruger til Prometheus:

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

Opret de nødvendige mapper:

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

Download den nyeste version af Prometheus:

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

Udpak den downloadede fil:

tar xvf prometheus-*.tar.gz

Flyt binære filer til den passende mappe:

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

Flyt konfigurationsfilen og indstil tilladelser:

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

Trin 3: Opret en Prometheus servicefil

Opret en servicefil til Prometheus:

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

Tilføj følgende indhold:

[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

Genindlæs systemd-daemonen og start Prometheus:

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

Trin 4: Installer Grafana

Tilføj Grafana APT-repo:

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

Installer Grafana:

sudo apt update
sudo apt install grafana

Start og aktiver Grafana:

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

Trin 5: Adgang til Grafana

Åbn din webbrowser og gå til http://your_domain.com:3000. Standardlogin er:

  • Brugernavn: admin
  • Adgangskode: admin

Du vil blive bedt om at ændre adgangskoden ved første login.

Trin 6: Konfigurer Prometheus som datakilde i Grafana

Når du er logget ind i Grafana, skal du navigere til Konfiguration > Datakilder > Tilføj datakilde og vælge Prometheus. Indtast URL'en:

http://localhost:9090

Klik på Gem & Test for at verificere forbindelsen.

Konklusion

Du har nu installeret Grafana og Prometheus på din Ubuntu 24.04 VPS-server. Du kan nu begynde at overvåge dine applikationer!



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
  • 0 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

Boost Your Ubuntu System's Performance with a Swap File: A Step-by-Step Guide

What is a Swap File? A swap file in Ubuntu serves as dedicated virtual memory on your hard...

How to Migrate ISPConfig 2, ISPConfig 3.x, Confixx, CPanel or Plesk to ISPConfig 3.2 (single server)

Introduction Migration from other control panels like ISPConfig 2, ISPConfig 3.x, Confixx,...

How to Install and Configure Zabbix Server and Client on Rocky Linux 9

Introduction Zabbix is an open-source monitoring solution that provides real-time...

How to Install CockroachDB Cluster on Debian 12

Introduction CockroachDB is a distributed SQL database built to handle large-scale,...

How to Install Joomla with Apache and Let's Encrypt SSL on AlmaLinux 9

Introduction Joomla is a popular open-source content management system (CMS) used to build...