
Cập nhật lần cuối: 23/01/2026 17:00
Cài đặt Alloy trên Linux (Root access required), thực hiện lệnh sau:
/bin/sh -c "$(curl -fsSL https://s3hn.smartcloud.vn/agent/alloy/linux/releases/v1.8.3/install-linux.sh)"Chỉnh sửa cấu hình Alloy, để lấy metrics, logs từ dịch vụ mong muốn:
Trước tiên chạy dịch vụ Alloy, thực hiện lệnh:
sudo systemctl start alloySau đó kiểm tra xem dịch vụ đã chạy thành công chưa:
sudo systemctl status alloyNếu thành công, hệ thống sẽ trả về như sau:
● alloy.service - Vendor-agnostic OpenTelemetry Collector distribution with programmable pipelines
Loaded: loaded (/lib/systemd/system/alloy.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2024-12-31 10:01:57 +07; 12s ago
Docs: https://grafana.com/docs/alloy
Main PID: 2444266 (alloy)
Tasks: 13 (limit: 9385)
Memory: 167.1M
CPU: 1.954s
CGroup: /system.slice/alloy.service
└─2444266 /usr/bin/alloy run --server.http.listen-addr=0.0.0.0:30000 --storage.path=/var/lib/alloy/data /etc/alloy/config.alloyĐể xem log của Alloy:
sudo journalctl -u alloy