idealista / prometheus_server_role

Ansible role to install a Prometheus server
Apache License 2.0
5 stars 4 forks source link

Prometheus overwrites log file when restarted #21

Closed jnogol closed 5 years ago

jnogol commented 5 years ago

Prerequisites

Description

Due to the ">" in https://github.com/idealista/prometheus_server-role/blob/master/templates/prometheus.service.j2#L11, every time Prometheus is restarted it overwrites prometheus.log. It should be replaced with ">>" so it appends the new output to the previous log file.

Steps to Reproduce

  1. Watch prometheus.log file.
  2. Restart Prometheus with systemctl restart prometheus.service
  3. Watch prometheus.log file.

Expected behavior: See both restarts.

Actual behavior: Only last restart appears.

Reproduces how often: Always

Versions

All.