Coder Social home page Coder Social logo

sensu-plugins / sensu-plugins-docker Goto Github PK

View Code? Open in Web Editor NEW
35.0 11.0 57.0 131 KB

This plugin provides native Docker instrumentation for monitoring and metrics collection, including: container status, container number, and container metrics via `docker ps`.

Home Page: http://sensu-plugins.io

License: MIT License

Ruby 100.00%
sensu-plugins docker monitoring metrics

sensu-plugins-docker's Introduction

Sensu-Plugins-docker

Build Status Gem Version Code Climate Test Coverage Dependency Status

Functionality

This check supports docker versions >= 1.18. Check docker-engine API for more information

Files

  • check-container.rb
  • check-container-logs.rb
  • check-docker-container.rb
  • metrics-docker-container.rb
  • metrics-docker-stats.rb
  • metrics-docker-info.rb

Usage

Default docker host

By default, all the checks will try to use a default docker host if a specific docker host is not provided to the check on the command line (-H <docker_host> / --docker-host <docker_host>).

Those paramaters will be tried in this order as default docker host :

DOCKER_URL environnement variable
DOCKER_HOST environnement variable
/var/run/docker.sock file

Installation

Installation and Setup

Notes

docker-engine API

sensu-plugins-docker's People

Contributors

aksentyev avatar alcasim avatar analytically avatar antonidabek avatar cwjohnston avatar d4n13lbc avatar dependabot-preview[bot] avatar derfred avatar drmurx avatar eheydrick avatar evesy avatar guikcd avatar israelriibeiro avatar jameslegg avatar kelcecil avatar majormoses avatar mattyjones avatar mjulian avatar oba11 avatar obazoud avatar rockandska avatar rvdh avatar sensu-plugin avatar sstarcher avatar tas50 avatar tata2000 avatar theyough avatar ttarczynski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sensu-plugins-docker's Issues

Update Sensu Plugin to 1.3 or higher

The current gemspec file has a dependency on Sensu Plugin up to 1.2.0 which was released in July 2015. Users such as myself are unable to make use of this Sensu docker plugin due to using more up-to-date-Sensu deployments. I am happy to open a PR which bumps the version dependency in the gemspec, but I am unsure as to the implications.

Could not find a valid gem 'sys-proctable' (= 0.9.8) in any repository

gem install sensu-plugins-docker
ERROR:  Could not find a valid gem 'sys-proctable' (= 0.9.8) in any repository
ERROR:  Possible alternatives: sys-proctable

looks like the verison of sys-proctable you are using isn't there anymore, and it won't run on the newer version either.

ruby metrics-docker-stats.rb
/usr/lib/ruby/2.4.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'sys-proctable' (= 0.9.8) - did find: [sys-proctable-1.2.1] (Gem::MissingSpecVersionError)
Checked in 'GEM_PATH=/root/.gem/ruby/2.4.0:/usr/lib/ruby/gems/2.4.0', execute `gem env` for more information
        from /usr/lib/ruby/2.4.0/rubygems/specification.rb:1445:in `block in activate_dependencies'
        from /usr/lib/ruby/2.4.0/rubygems/specification.rb:1434:in `each'
        from /usr/lib/ruby/2.4.0/rubygems/specification.rb:1434:in `activate_dependencies'
        from /usr/lib/ruby/2.4.0/rubygems/specification.rb:1416:in `activate'
        from /usr/lib/ruby/2.4.0/rubygems.rb:220:in `rescue in try_activate'
        from /usr/lib/ruby/2.4.0/rubygems.rb:213:in `try_activate'
        from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:126:in `rescue in require'
        from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        from metrics-docker-stats.rb:41:in `<main>'
(failed reverse-i-search)`insall': cd /usr/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.1.1/lib/sensu-plug^Cs-docker

Make unix://var/run/docker.sock default (or fall back?) interface

According to docker

By default the Docker daemon listens on unix:///var/run/docker.sock

Currently, I have to do following to run metrics-docker-stats

/opt/sensu/embedded/bin/ruby ./metrics-docker-stats.rb -H /var/run/docker.sock -p unix

I think -p unix -H /var/run/docker.sock should be the default interface method for these plugin - or make it automatically fall back to it.

By the way, metrics-docker-container.rb doesn't even support -p unix. Is it to possible to support it?

warning with 1.1.0 when using unix socket connection with Ruby 2.3.0p0

I'm getting the following warning when using the unix socket connection and Ruby 2.3.0p0:

root@server:~# /opt/sensu/embedded/bin/check-docker-container.rb -h /var/run/docker.sock containername
/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
CheckDockerContainers OK

Tested on Ubuntu 14.04 with Sensu 0.23.3-1.

docker running but metrics-docker-container.rb says it's not

I have a working docker engine on my machine, and I can do docker ps / info etc..

docker info
Containers: 10
Images: 202
Storage Driver: devicemapper
 Pool Name: docker-253:0-1382736-pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: xfs
 Data file:
 Metadata file:
 Data Space Used: 5.304 GB
 Data Space Total: 107.4 GB
 Data Space Available: 102.1 GB
 Metadata Space Used: 9.257 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.138 GB
 Udev Sync Supported: true
 Library Version: 1.02.93-RHEL7 (2015-01-28)
Execution Driver: native-0.2
Kernel Version: 3.10.0-229.7.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
CPUs: 2
Total Memory: 3.703 GiB
Name: core1.ppa.iu.edu
ID: KC6Z:U7IE:FCGQ:Y6ST:AL6K:VYNF:3NGC:ZA4H:LNWI:EI7K:EHPS:MPLE

But.. when I run metrics-docker-container.rb I get following error message.

# metrics-docker-container.rb
time="2015-09-14T17:07:54Z" level=fatal msg="Cannot connect to the Docker daemon. Is 'docker -d' running on this host?"

I tried "-H localhost" but that didn't fix it. What am I missing?

Issue with using check-docker-container.rb

I tried using multiple ways to use this plugin "check-docker-container.rb" but I'm having an error. Below are the syntax that I've tried.

check-docker-container.rb -h 127.0.0.1:/var/run/docker.sock -c 6
check-docker-container.rb -h /var/run/docker.sock -c 6
check-docker-container.rb -h 127.0.0.1 -c 6
check-docker-container.rb /var/run/docker.sock -c 6

Here is the error:

CheckDockerContainers WARNING: Error: #<Errno::ECONNREFUSED: Failed to open TCP connection to 127.0.0.1:2375 (Connection refused - connect(2) for "127.0.0.1" port 2375)>

We're running docker with multiple ports so the best way is to check the /var/run/docker.sock. I'm not sure if I'm doing the right thing since I'm new to Sensu.

Sensu Client Docker container Metrics

Hello,

It was my understanding that inside a container we cannot have access to metrics because they are low level information shared from the host Linux kernel. Does anybody knows of a way to gather metrics from inside a docker container with a sensu client and sensu server checks system? For what I've read only through installation on the docker host of a sensu client I can collect the metrics that a need. I need to collect metrics from withing the container and this is not possible.... I think it should be possible to simply installations and use docker container sensu and it's clients.

check-docker-container can't connect to unix sock

I'm trying to monitor my Docker container with check-docker-container.rb -c nginx-proxy -h /var/run/docker.sock command and get an error:

CheckDockerContainers WARNING: Error: #<Errno::EACCES: Permission denied - connect(2) for /var/run/docker.sock>

I've added sensu user to the docker group but no luck...

Most plugins don't support connecting to a remote Docker daemon with TLS enabled

Typically:

 ./metrics-docker-stats.rb --container some-container --docker-host swarm-host:2375 --protocol http
Check failed to run: wrong status line: "\x15\x03\x01\x00\x02\x02", [
"/usr/lib/ruby/2.2.0/net/http/response.rb:41:in `read_status_line'",
"/usr/lib/ruby/2.2.0/net/http/response.rb:28:in `read_new'",
"/usr/lib/ruby/2.2.0/net/http.rb:1414:in `block in transport_request'",
"/usr/lib/ruby/2.2.0/net/http.rb:1411:in `catch'",
"/usr/lib/ruby/2.2.0/net/http.rb:1411:in `transport_request'",
"/usr/lib/ruby/2.2.0/net/http.rb:1384:in `request'",
"./metrics-docker-stats.rb:127:in `block in docker_api'",
"/usr/lib/ruby/2.2.0/net/http.rb:853:in `start'",
"/usr/lib/ruby/2.2.0/net/http.rb:583:in `start'",
"./metrics-docker-stats.rb:125:in `docker_api'",
"./metrics-docker-stats.rb:158:in `container_stats'",
"./metrics-docker-stats.rb:91:in `block in run'",
"./metrics-docker-stats.rb:90:in `each'",
"./metrics-docker-stats.rb:90:in `run'",
"/home/jballet/local/gems/gems/sensu-plugin-1.2.0/lib/sensu-plugin/cli.rb:56:in `block in <class:CLI>'"]

The plugins which are using the docker-api gem instead of manually doing the connection to the Docker daemon work OK though.

I would like to propose a patch which removes all these hand-crafted connection handlers and use this docker-api gem instead to connect to the Docker daemon, if it's possible.
This would decrease the amount of code here while providing larger support of different kind of deployment.

As the same time, this would probably require (although not necessarily, but NOT doing it would just increase the size of the code) to change the different checks interface by requiring a single parameter which would be the URL to connect to (instead of -H + -p of some checks, -h or -u (really?) of the other checks). This would be of course a backward incompatible change.

-n option causes metrics-docker-stats.rb to fail

I can run metrics-docker-stats.rb successfully by doing following

 /opt/sensu/embedded/bin/ruby ./metrics-docker-stats.rb -H /var/run/docker.sock -p unix 

However, when I add "-n" option, it fails with following message.

...
soichi7.ppa.iu.edu.docker.portal-apache1.memory_stats.stats.total_unevictable 0 1449347656
soichi7.ppa.iu.edu.docker.portal-apache1.memory_stats.stats.unevictable 0 1449347656
soichi7.ppa.iu.edu.docker.portal-apache1.memory_stats.failcnt 0 1449347656
soichi7.ppa.iu.edu.docker.portal-apache1.memory_stats.limit 12431413248 1449347656
Check failed to run: 757: unexpected token at 'no such id: portal-apache1mysql
', ["/opt/sensu/embedded/lib/ruby/2.0.0/json/common.rb:155:in `parse'", "/opt/sensu/embedded/lib/ruby/2.0.0/json/common.rb:155:in `parse'", "./metrics-docker-stats.rb:113:in `block (3 levels) in docker_api'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/protocol.rb:411:in `call_block'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/protocol.rb:402:in `<<'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/protocol.rb:106:in `read'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http/response.rb:284:in `block in read_body_0'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http/response.rb:269:in `inflater'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http/response.rb:274:in `read_body_0'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http/response.rb:201:in `read_body'", "./metrics-docker-stats.rb:112:in `block (2 levels) in docker_api'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http.rb:1419:in `block (2 levels) in transport_request'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http/response.rb:162:in `reading_body'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http.rb:1418:in `block in transport_request'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http.rb:1409:in `catch'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http.rb:1409:in `transport_request'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http.rb:1382:in `request'", "./metrics-docker-stats.rb:111:in `block in docker_api'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http.rb:852:in `start'", "/opt/sensu/embedded/lib/ruby/2.0.0/net/http.rb:582:in `start'", "./metrics-docker-stats.rb:109:in `docker_api'", "./metrics-docker-stats.rb:158:in `container_stats'", "./metrics-docker-stats.rb:91:in `block in run'", "./metrics-docker-stats.rb:90:in `each'", "./metrics-docker-stats.rb:90:in `run'", "/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-plugin-1.2.0/lib/sensu-plugin/cli.rb:56:in `block in <class:CLI>'"]

outputCheck failed to run

command: 
check-container.rb --host tcp://172.16.0.3:2375/ mobile_es_1

output: 
Check failed to run: uninitialized constant Docker::Error, ["/opt/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/sensu-plugins-docker-0.0.2/bin/check-container.rb:62:in `rescue in run'", "/opt/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/sensu-plugins-docker-0.0.2/bin/check-container.rb:52:in `run'", "/opt/rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/sensu-plugin-1.1.0/lib/sensu-plugin/cli.rb:56:in `block in <class:CLI>'"] 

Any ideas why it's happening?

Should at least one container be running at anytime?

Using 3.1.1 of the docker plugin. And tried the following.

# ./check-docker-container.rb -C 10 -W 8
CheckDockerContainers CRITICAL: Less than 1 containers running. 0 running.

Why does its also assume that at least one container should be running? Some how that does not feel right.

metrics-docker-stats.rb invalid line in graphite

Hi,

i get

invalid message line: stats.docker.meet-3.precpu_stats.cpu_usage.percpu_usage

but i don't see whats wrong:

02/06/2016 13:26:46 :: invalid message line: stats.docker.meet-3.cpu_stats.cpu_usage.percpu_usage 87947260773 89019969698 87542041490 88047874778 19494320623 20385737322 20330167000 21439983103 1464866793

is there anyhting i can provide?

regards

Check commands fail with remote docker host

I just installed sensu-docker-plugins and it is working great with the local host, but I can't check remote docker hosts. It is failing with getaddrinfo() errors even if I specify an IP, which seems odd. Running docker commands with the docker CLI and DOCKER_HOST set works fine for the same remote host.

I have tried various combinations of hostname, fqdn, and ip; both with and without protocol and port with no luck. Using the -Y option the commands fail with in getaddrinfo(). If I try and use the environment variable it fails in sub().

I'm on sensu 1.2.1 with version 3.1.0 of the plugin.

For example:

> DOCKER_HOST=172.16.xxx.yyy docker ps
CONTAINER ID        IMAGE                                           COMMAND                  CREATED             STATUS                    PORTS                                                                        NAMES
... list of docker processes ...

> /opt/sensu/embedded/bin/check-docker-container.rb -H 172.16.xxx.yyy
Check failed to run: Failed to open TCP connection to http://172.16.xxx.yyy:2375 (getaddrinfo: Name or service not known), ["/opt/sensu/embedded/lib/ruby/2.4.0/net/http.rb:906:in `rescue in block in connect'", "/opt/sensu/embedded/lib/ruby/2.4.0/net/http.rb:903:in `block in connect'", "/opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'", "/opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:103:in `timeout'", "/opt/sensu/embedded/lib/ruby/2.4.0/net/http.rb:902:in `connect'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/net_http_unix-0.2.2/lib/net_x/http_unix.rb:26:in `connect'", "/opt/sensu/embedded/lib/ruby/2.4.0/net/http.rb:887:in `do_start'", "/opt/sensu/embedded/lib/ruby/2.4.0/net/http.rb:882:in `start'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.1.0/lib/sensu-plugins-docker/client_helpers.rb:21:in `initialize'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.1.0/bin/check-docker-container.rb:104:in `new'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.1.0/bin/check-docker-container.rb:104:in `run'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-2.5.0/lib/sensu-plugin/cli.rb:57:in `block in <class:CLI>'"]

> DOCKER_HOST=172.16.xxx.yyy /opt/sensu/embedded/bin/check-container.rb -N flexget
Check failed to run: can't modify frozen String, ["/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.1.0/lib/sensu-plugins-docker/client_helpers.rb:8:in `sub!'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.1.0/lib/sensu-plugins-docker/client_helpers.rb:8:in `initialize'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.1.0/bin/check-container.rb:66:in `new'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.1.0/bin/check-container.rb:66:in `run'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-2.5.0/lib/sensu-plugin/cli.rb:57:in `block in <class:CLI>'"]

Error when a container is Restarting and option -P is used in the metric-container-stats.rb

If the option -P is used in the metric-container-stats.rb and one of the docker containers has the state Restarting, an error appears when Sensu executes the plugin.
Ex:
/opt/sensu/embedded/bin/metrics-docker-stats.rb -H /var/run/docker.sock -n -P

Error:

mongo-historico-conf.id 5b90c05015de78d7f5489d142f74998a5a6250d13b455e985bde12450e3596a6 1566806214
Check failed to run: undefined method `-' for nil:NilClass, ["/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.2.0/bin/metrics-docker-stats.rb:212:in `calculate_cpu_percent'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.2.0/bin/metrics-docker-stats.rb:153:in `output_stats'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.2.0/bin/metrics-docker-stats.rb:135:in `block in run'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.2.0/bin/metrics-docker-stats.rb:121:in `each'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.2.0/bin/metrics-docker-stats.rb:121:in `run'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-2.7.1/lib/sensu-plugin/cli.rb:57:in `block in <class:CLI>'"]

If you stop/down this container, the Sensu plugin works fine.

It's possible to solve it??

Are API version: 1.23 supported?

# docker version
Client:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:23:11 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:23:11 2016
 OS/Arch:      linux/amd64
Check failed to run: 419: unexpected token at '{"Id":"ac99cc9f8563142d82c9a2af00e98164372', ["/opt/sensu
/embedded/lib/ruby/2.3.0/json/common.rb:156:in `parse'", "/opt/sensu/embedded/lib/ruby/2.3.0/json/common
.rb:156:in `parse'", "/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-docker-1.1.3/bin/metric
s-docker-stats.rb:121:in `block (3 levels) in docker_api'", "/opt/sensu/embedded/lib/ruby/2.3.0/net/prot
ocol.rb:411:in `call_block'", "/opt/sensu/embedded/lib/ruby/2.3.0/net/protocol.rb:402:in `<<'", "/opt/se
nsu/embedded/lib/ruby/2.3.0/net/protocol.rb:104:in `read'", "/opt/sensu/embedded/lib/ruby/2.3.0/net/http
/response.rb:319:in `read_chunked'", "/opt/sensu/embedded/lib/ruby/2.3.0/net/http/response.rb:283:in `bl
ock in read_body_0'", "/opt/sensu/embedded/lib/ruby/2.3.0/net/http/response.rb:276:in `inflater'", "/opt
/sensu/embedded/lib/ruby/2.3.0/net/http/response.rb:281:in `read_body_0'", "/opt/sensu/embedded/lib/ruby
/2.3.0/net/http/response.rb:202:in `read_body'", "/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plu
gins-docker-1.1.3/bin/metrics-docker-stats.rb:120:in `block (2 levels) in docker_api'", "/opt/sensu/embe
dded/lib/ruby/2.3.0/net/http.rb:1446:in `block in transport_request'", "/opt/sensu/embedded/lib/ruby/2.3
.0/net/http/response.rb:163:in `reading_body'", "/opt/sensu/embedded/lib/ruby/2.3.0/net/http.rb:1445:in 
`transport_request'", "/opt/sensu/embedded/lib/ruby/2.3.0/net/http.rb:1407:in `request'", "/opt/sensu/em
bedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-docker-1.1.3/bin/metrics-docker-stats.rb:119:in `block in 
docker_api'", "/opt/sensu/embedded/lib/ruby/2.3.0/net/http.rb:853:in `start'", "/opt/sensu/embedded/lib/
ruby/2.3.0/net/http.rb:584:in `start'", "/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-dock
er-1.1.3/bin/metrics-docker-stats.rb:117:in `docker_api'", "/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems
/sensu-plugins-docker-1.1.3/bin/metrics-docker-stats.rb:152:in `list_containers'", "/opt/sensu/embedded/
lib/ruby/gems/2.3.0/gems/sensu-plugins-docker-1.1.3/bin/metrics-docker-stats.rb:96:in `run'", "/opt/sens
u/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.2.0/lib/sensu-plugin/cli.rb:56:in `block in <class:CL
I>'"]

New release planned ?

Is a new release planned any time soon for this plugin ? That last release was in August.

[check-container.rb] Allow the use of regexp or glob to describe container name

In some cases (docker-compose upgrade, or other) the names of the containers change. For example in recent version upgrades we went from folder-with-dash_service_number to folderwithdash_service_number.

It would be nice to have a simple glob type syntax to check the existence of a container runner so that we could have *_service_* instead of folder-with-dash_service_number.

basic question

I am new to sensu, how do you configure a client plugin like this to communicate back to the server? Is there a good place to start?

Wrong values plugin metrics-docker-stats.rb

Hi, i have absurd values into output of metrics-docker-stats.rb, my command is
metrics-docker-stats.rb -s prod -c apache_1 -H ip_docker_socket:2375

output:
prod.apache_1.cpu_stats.system_cpu_usage 7964339440000000 1470318274

what does it mean 7964339440000000 ??

Check docker-compose instances

As partially described in #78 we use this plugin to check docker-compose orchestrated instances. Would it be useful to the community to have some sort of check which goes through docker-compose to run checks ? Maybe by using docker-compose ps (or other compose relevant commands) ?

Poor documentation

What exactly do you mean by "container metrics". Would that be CPU, RAM, Disk utilization? Anything else? Poor documentation on what this plugin actually shows/does.

metrics-docker-stats.rb fails if requested environment variable (-e) is not present on the container

metrics-docker-stats.rb fails to run if requested environment variable (-e) is not present on the container:

metrics-docker-stats.rb -H /var/run/docker.sock -p unix -e BANANAS -i -P
Check failed to run: undefined method `gsub' for nil:NilClass, ["/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-1.4.0/bin/metrics-docker-stats.rb:209:in `block in container_tags'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-1.4.0/bin/metrics-docker-stats.rb:208:in `each'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-1.4.0/bin/metrics-docker-stats.rb:208:in `container_tags'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-1.4.0/bin/metrics-docker-stats.rb:133:in `block in run'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-1.4.0/bin/metrics-docker-stats.rb:129:in `each'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-1.4.0/bin/metrics-docker-stats.rb:129:in `run'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-1.4.5/lib/sensu-plugin/cli.rb:58:in `block in <class:CLI>'"]```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.