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

Exception in docker.py if no containers running #980

Closed
graemej opened this issue Jun 17, 2014 · 2 comments
Closed

Exception in docker.py if no containers running #980

graemej opened this issue Jun 17, 2014 · 2 comments
Assignees
Milestone

Comments

@graemej
Copy link
Contributor

graemej commented Jun 17, 2014

The Docker check is producing exceptions if there aren't any containers running, which doesn't really feel like an exceptional condition.

Here's an example of the backtrace:

2014-06-17 14:31:09 UTC | ERROR | dd.collector | checks.docker(__init__.py:515) | Check 'docker' instance #0 failed
Traceback (most recent call last):
  File "/usr/share/datadog/agent/checks/__init__.py", line 506, in run
    self.check(copy.deepcopy(instance))
  File "/usr/share/datadog/agent/checks.d/docker.py", line 151, in check
    raise Exception("No containers are running.")
Exception: No containers are running.

For what it's worth we're running datadog-agent 1:4.3.1-522, but it doesn't look like behaviour in master has changed. Perhaps set the 'running containers' gauge to zero and just return instead?

@remh remh added this to the 4.x milestone Jun 19, 2014
@remh
Copy link
Contributor

remh commented Jun 19, 2014

You're right, we should probably have a warning though as it seems weird to have a docker integration enabled but no containers running.

@LotharSee can you have a look pelase ?

@graemej
Copy link
Contributor Author

graemej commented Jun 19, 2014

The 'no containers' case happened as I was provisioning a new node, but the same thing could happen when deploying new code (i.e. sample occurs when old container is gone but before replacement comes up).

On Jun 19, 2014, at 5:43 PM, Remi Hakim notifications@github.com wrote:

You're right, we should probably have a warning though as it seems weird to have a docker integration enabled but no containers running.

@LotharSee can you have a look pelase ?


Reply to this email directly or view it on GitHub.

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

3 participants