Prometheus를 시스템 데몬으로 설정

young·2024년 11월 12일

LGTM

목록 보기
9/9

Prometheus 서비스 등록

vi /etc/systemd/system/prometheus.service
  • prometheus.service

    [Unit]
    Description=Prometheus Server
    Documentation=https://prometheus.io/docs/introduction/overview/
    After=network.target
    
    [Service]
    User=ec2-user
    Restart=on-failure
    ExecStart=/home/ec2-user/prometheus/prometheus --config.file=/home/ec2-user/prometheus/prometheus.yml --storage.tsdb.path=/home/ec2-user/prometheus/data --web.enable-lifecycle
    
    [Install]
    WantedBy=multi-user.target

데몬 재시작

systemctl daemon-reload

prometheus 시작

systemctl start prometheus
systemctl enable prometheus

0개의 댓글