Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres monitoring fails to reconnect when postgres is restarted #784

Closed
evanj opened this issue Jan 3, 2014 · 1 comment
Closed

Postgres monitoring fails to reconnect when postgres is restarted #784

evanj opened this issue Jan 3, 2014 · 1 comment
Milestone

Comments

@evanj
Copy link

evanj commented Jan 3, 2014

(I apologize if this is the wrong way to report agent bugs; feel free to point me to the correct location)

I'm running datadog-agent using the official Ubuntu package (4.0.1-236). Today I ran into the following problem:

I'm using the built-in Postgres monitoring connection, configured using /etc/dd-agent/conf.d/postgres.yaml to connect to localhost. Today, I restarted Postgres for an upgrade. A few hours later, I noticed that datadog agent wasn't collecting statistics. The following errors appeared in syslog. A restart of datadog agent fixed the problem.

I'm guessing datadog needs to detect when the connection is broken and attempt to re-connect?

Jan 3 15:58:15 ip-10-99-19-84 dd.collector[22640]: ERROR (init.py:468): Check 'postgres' instance #0 failed#012Traceback (most recent call last):#12 File "/usr/share/datadog/agent/checks/init.py", line 459, in run#012 self.check(instance)#12 File "/usr/share/datadog/agent/checks.d/postgres.py", line 152, in check#012 self._collect_stats(key, db, tags)#12 File "/usr/share/datadog/agent/checks.d/postgres.py", line 80, in _collect_stats#012 cursor = db.cursor()#012InterfaceError: connection already closed

@remh remh added this to the 4.2.x milestone Mar 6, 2014
@remh remh closed this as completed in 1a31e0d Mar 7, 2014
@remh
Copy link
Contributor

remh commented Mar 7, 2014

Thanks @evanj
This behavior will be fixed with the next version of the agent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants