一,在service文件中,指定日志的level
编辑service文件
[Unit]
Description=Alert Manager
wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=prometheus
Group=prometheus
Restart=always
ExecStart=/opt/alertmanager-0.27.0.linux-amd64/alertmanager --config.file=/opt/alertmanager-0.27.0.linux-amd64/alertmanager.yml --storage.path=/opt/alertmanager-0.27.0.linux-amd64/data/ --log.level=debug
[Install]
WantedBy=multi-user.target
然后重新加载service文件:
# systemctl daemon-reload
二,查看日志:
用journalctl 查看日志
journalctl -u alertmanager.service
标签:opt,alertmanager,查看,service,0.27,linux,日志 From: https://www.cnblogs.com/architectforest/p/18525309