ansible icon indicating copy to clipboard operation
ansible copied to clipboard

Enable option "prometheus_start_timeout" to configure the prometheus.service.

Open gmej opened this issue 1 year ago • 2 comments

Enabling this option for the service file is needed so we can tell the service how much to wait before failing the service initialization. I find this useful in my setup, as Prometheus starts on boot but it needs of a NFS mount, and Prometheus startup fails, instead of waiting for that condition to be true.

Also I find this should be something not too complicated, as the option "prometheus_start_timeout" is already present and working.

gmej avatar Jul 08 '24 10:07 gmej

In my case, I added these options to the Prometheus.service file:

TimeoutStartSec=600s
RestartSec=5

I realized I needed both options, as only TimeoutStartSec did not solve my problem. Maybe the solution could be completely parse all the options in the service file to variables in the main.yaml file?

gmej avatar Jul 08 '24 10:07 gmej

Having a startup timeout is a good idea since it can take quite a while to startup when recovering the WAL.

Prometheus starts on boot but it needs of a NFS mount

FYI, this is explicitly not recommended by the Prometheus documentation.

SuperQ avatar Nov 07 '24 14:11 SuperQ