Prometheus not starting without existing query_log_file path (prometheus.yml)

Hi,

Prometheus is no starting if the query_log_file path (prometheus.yml) doesn`t exists completely.

Prometheus will not start if the specified query_log_file path does not fully exist. In my example, the path “C:/Users/name/build” exists, but not “/prometheus/query.logs”. Is it possible to configure Prometheus so that Prometheus automatically creates the prometheus folder and the query.logs file on startup if it doesn’t exist?

global:
  query_log_file: C:/Users/name/build/prometheus/query.logs

Thanks for the help! :innocent:

I wrote a batch skript that solved the issue.

I don’t think it would be wise for Prometheus to handle this ; this would likely transparently let you make typos that would be hard to notice.

@ roidelapluie My script is called before Prometheus starts. This will ensure that the folder exists and only after that Prometheus will start. Is this still a problem?