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

Use local var for container_name #2464

Merged
merged 1 commit into from
May 4, 2016
Merged

Use local var for container_name #2464

merged 1 commit into from
May 4, 2016

Conversation

yenif
Copy link
Contributor

@yenif yenif commented May 4, 2016

Fixes

2016-05-04 05:24:24 UTC | ERROR | dd.collector | checks.docker_daemon(__init__.py:763) | Check 'docker_daemon' instance #0 failed
Traceback (most recent call last):
  File "/opt/datadog-agent/agent/checks/__init__.py", line 746, in run
    self.check(copy.deepcopy(instance))
  File "/opt/datadog-agent/agent/checks.d/docker_daemon.py", line 222, in check
    containers_by_id = self._get_and_count_containers()
  File "/opt/datadog-agent/agent/checks.d/docker_daemon.py", line 273, in _get_and_count_containers
    self._filter_containers(containers)
  File "/opt/datadog-agent/agent/checks.d/docker_daemon.py", line 412, in _filter_containers
    self.log.debug("Container {0} is filtered".format(container["Names"][0]))
IndexError: list index out of range

when trying to exclude containers from monitoring

Fixes
```
2016-05-04 05:24:24 UTC | ERROR | dd.collector | checks.docker_daemon(__init__.py:763) | Check 'docker_daemon' instance #0 failed
Traceback (most recent call last):
  File "/opt/datadog-agent/agent/checks/__init__.py", line 746, in run
    self.check(copy.deepcopy(instance))
  File "/opt/datadog-agent/agent/checks.d/docker_daemon.py", line 222, in check
    containers_by_id = self._get_and_count_containers()
  File "/opt/datadog-agent/agent/checks.d/docker_daemon.py", line 273, in _get_and_count_containers
    self._filter_containers(containers)
  File "/opt/datadog-agent/agent/checks.d/docker_daemon.py", line 412, in _filter_containers
    self.log.debug("Container {0} is filtered".format(container["Names"][0]))
IndexError: list index out of range
```
when trying to exclude containers from monitoring
@hkaj
Copy link
Member

hkaj commented May 4, 2016

Looks good to me. Good catch @yenif and thanks for providing a fix!

@hkaj hkaj merged commit d83f64c into DataDog:master May 4, 2016
@hkaj hkaj added this to the 5.8.0 milestone May 4, 2016
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

Successfully merging this pull request may close these issues.

2 participants