sensu-plugins / sensu-plugins-docker

This plugin provides native Docker instrumentation for monitoring and metrics collection, including: container status, container number, and container metrics via `docker ps`.
http://sensu-plugins.io
MIT License
35 stars 57 forks source link

Update check-container.rb #52

Closed israelriibeiro closed 7 years ago

israelriibeiro commented 7 years ago

I got this two problems:

WARNING: Error: #<NameError: undefined local variable or method `container_state' for #

container_state had no prior declaration.

response.body.include? 'no such id' I got this message: "{\"message\":\"No such container: e941be33c527\"}\n" Which always returned this error,

<NoMethodError: undefined method `[]' for nil:NilClass>

So i test if we'll always get 404 if a container does not exist. Everythink went ok.

CheckDockerContainer CRITICAL: e941be33c527 is not running on /var/run/docker.sock

majormoses commented 7 years ago

@israelriibeiro thanks I will take a look tonight when I have some time, I would like to understand where it broke.

israelriibeiro commented 7 years ago

I forgot to say, i was using:

Docker version 17.05.0-ce, build 89658be

cat /etc/debian_version 8.2

If you need more info, please, let me know.

majormoses commented 7 years ago

that would be it, see: https://github.com/sensu-plugins/sensu-plugins-docker/pull/51

EDIT: Disregard not related.

majormoses commented 7 years ago

released: https://rubygems.org/gems/sensu-plugins-docker/versions/1.3.1