rabbitmq-exporter启动、停止、重启、自启动
service文件
根据实际内容进行修改
vi /usr/lib/systemd/system/rabbitmq_exporter.service
[Unit]
Description=rabbitmq-exporter
Documentation=https://prometheus.io/
After=network.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/opt/rabbitmq_exporter
ExecStart=/opt/rabbitmq_exporter/rabbitmq_exporter \
-config-file config.json
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target