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

Refresh stale health status on health check request #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zer0def
Copy link

@zer0def zer0def commented Jul 8, 2021

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