菜单
开源

在 Linux 上运行 Grafana Alloy

Alloy 在 Linux 上作为 systemd 服务安装

启动 Alloy

要启动 Alloy,在终端窗口中运行以下命令

shell
sudo systemctl start alloy

可选:要验证服务是否正在运行,在终端窗口中运行以下命令

shell
sudo systemctl status alloy

配置 Alloy 开机自启

要在系统启动时自动运行 Alloy,在终端窗口中运行以下命令

shell
sudo systemctl enable alloy.service

重启 Alloy

要重启 Alloy,在终端窗口中运行以下命令

shell
sudo systemctl restart alloy

停止 Alloy

要停止 Alloy,在终端窗口中运行以下命令

shell
sudo systemctl stop alloy

查看 Alloy 日志

要查看 Alloy 日志文件,在终端窗口中运行以下命令

shell
sudo journalctl -u alloy

后续步骤