• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wrouesnel / postgres_exporter / 586 / 1
66%
master: 66%

Build:
DEFAULT BRANCH: master
Ran 30 Oct 2019 04:04AM UTC
Files 2
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Oct 2019 03:54AM UTC coverage: 59.476% (+1.3%) from 58.172%
586.1

push

travis-ci

wrouesnel
Add retries to getServer() (#316)

Some backstory
==============

I was attempting to use postgres_exporter with the official Docker
container (https://hub.docker.com/_/postgres) In a Kubernetes
StatefulSet, with a side-car configuration, but found that I wasn't able
to connect even with sharing the Postgres Unix listening socket, between
both containers. After copying the container over to an Alpine base I
quickly found out that the postgres_exporter was actually starting
before the main Postres container had dropped the unix socket onto the
file system, a quick work around is to write a bash for loop checking
for the existence of a unix socket, however this would require
maintaining a container, besides other users may find retries useful on
startup.

Implementation
==============

All changes are made to the getServer function and variables are
local, I was unsure if it was worth adding command line switches but
this would allow for a more sophisticated backOff loop in the future.

Hope this help, and let me know if you would like me to changes
anything.

568 of 955 relevant lines covered (59.48%)

42.61 hits per line

Source Files on job 586.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 438
  • Travis Job 586.1
  • 043e68e0 on github
  • Prev Job for on master (#567.1)
  • Next Job for on master (#590.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc