Différentes méthodes d'installation sont disponibles sur la documentation officielle Grafana.
Ici on s'appuie sur l' ajout du dépôt APT de Grafana.
Une fois le dépôt ajouté, on peut installer l'application :
apt install -y alloy
A l'installation le service systemd a été créé mais ne s'exécute pas. Il faut l'activer :
systemctl enable alloy.service
systemctl start alloy.service
Par défaut, Alloy dispose d'une console web écoutant sur la boucle locale. Il est possible de la rendre ponctuellement disponible sur le réseau en modifiant la variable CUSTOM_ARGS du fichier /etc/default/alloy :
## Path: ## Description: Grafana Alloy settings ## Type: string ## Default: "" ## ServiceRestart: alloy # # Command line options for Alloy. # # The configuration file holding the Alloy config. CONFIG_FILE="/etc/alloy/config.alloy" # User-defined arguments to pass to the run command. CUSTOM_ARGS="--server.http.listen-addr=192.168.123.138:12345" # Restart on system upgrade. Defaults to true. RESTART_ON_UPGRADE=true
Fichier de configuration :
wget -q -O config.alloy https://github.com/grafana/alloy-scenarios/raw/refs/heads/main/linux/config.alloy