<mohammadrony>

Alloy

Installation

wget -qO- https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
sudo apt update
sudo apt install -y alloy

Configuration

Expose http server

sed -i -e 's/CUSTOM_ARGS=""/CUSTOM_ARGS="--server.http.listen-addr=0.0.0.0:12345"/' /etc/default/alloy

Start service

sudo systemctl enable --now alloy
sudo systemctl status alloy

Update config for metrics and logs

sudo cp config.alloy /etc/alloy/config.alloy

Reload config

curl -X POST http://localhost:12345/-/reload
# sudo systemctl reload alloy

Browse alloy ui.

Troubleshoot

Logs

sudo journalctl -u alloy