Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Refresh stale health status on health check request#11

Open
zer0def wants to merge 1 commit into
Showmax:masterfrom
zer0def:master
Open

Refresh stale health status on health check request#11
zer0def wants to merge 1 commit into
Showmax:masterfrom
zer0def:master

Conversation

@zer0def

@zer0def zer0def commented Jul 8, 2021

Copy link
Copy Markdown

This PR addresses the following failure scenario:

  1. No Prometheus is periodically scraping this exporter, Patroni daemon is down
  2. Exporter starts, during initialization attempts to connect to Patroni daemon, fails and caches the exception as 503 in self.collector.status.
  3. Without the fix, any request to the /health endpoint will result in a 503 response, even if the Patroni daemon starts running properly, but only until the first metric scrape once Patroni is running.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant