Skip to content

[FEATURE] Reload (instead of restart) Prometheus service if configs change and service is already running #80

@mdschmitt

Description

@mdschmitt

Is your feature request related to a problem?

There's actually no need to restart the prometheus service if you're just updating the configs. A simple reload will do the trick. https://prometheus.io/docs/introduction/faq/#can-i-reload-prometheuss-configuration

Describe the solution you'd like

IF

  1. The prometheus service and configurations files already exist (i.e. are just being updated/changed, as opposed to being freshly created)

AND

  1. The prometheus service is already running

THEN

Reload the prometheus service instead of "hard" restarting it.

Describe alternatives you've considered

I guess maybe enabling --enable-feature=memory-snapshot-on-shutdown https://prometheus.io/docs/prometheus/latest/feature_flags/#memory-snapshot-on-shutdown would help minimize restart time, but it's technically an experimental feature which makes me think I shouldn't run it in prod..

Additional context

If your prometheus installation is large-scale (i.e. scrapes a LOT of data), restarting it can take minutes while it replays the WAL logs. Reloading involves no downtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions