jut-cadvisor-agent

command module
v0.0.0-...-899b499 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2016 License: MIT Imports: 13 Imported by: 0

README

jut-cadvisor-agent

jut-cadvisor-agent is a companion program to [cAdvisor] (https://github.com/google/cadvisor), which monitors [Docker] (https://www.docker.com/) containers. It runs alongside cAdvisor, polling it for metrics/events, and sends those metrics/events to a Jut Data Node.

For more information on Jut Data Nodes and how to use the metrics and events collected from Docker containers, please visit our [Web Site] (http://www.jut.io) or read our [Documentation] (http://docs.jut.io).

Usage

jut-cadvisor-agent is typically run as follows:

 jut-cadvisor-agent --apikey=<apikey> --datanode=<jut data node hostname>

apikey is a string specific to your deployment. The jut data node hostname is a hostname of the form data-engine-192-168-37-12.jutdata.io.

Configuration

jut-cadvisor-agent can be configured from the command line or the environment. Command line arguments take precedence over environment variables.

###Environment Variables

The following environment variables control the behavior of jut-cadvisor-agent:

JUT_APIKEY - Jut Data Engine API Key. Must be provided in environment or on command line.
JUT_CADVISOR_URL - cAdvisor Root URL.
JUT_DATA_SOURCE - Data Source to use for points.
JUT_DATANODE - Jut Data Node Hostname. Must be provided in environment or on command line.
JUT_POLL_INTERVAL - How often to poll containers (seconds).
JUT_ALLOW_INSECURE_SSL - Allow insecure certificates when connecting to Jut Data Node.
JUT_METRICS - Collect Metrics from cAdvisor and send to Data Node.
JUT_EVENTS - Collect Events from cAdvisor and send to Data Node.
JUT_FULL_METRICS - Collect and report full set of metrics from containers.
JUT_SPACE - Jut Space to use for points.

###Command Line Arguments

The following command line arguments correspond to the above environment variables. Also included are their default values.

--apikey=""
--cadvisor_url=http://127.0.0.1:8080
--data_source="docker"
--datanode=""
--poll_interval=10
--allow_insecure_ssl=false
--metrics=true
--events=true
--full_metrics=false
--space="default"

Additionally, the following command line arguments can be provided to control logging behavior. They do not have corresponding environment variables.

--alsologtostderr=true - log to standard error as well as files.
--log_backtrace_at=:0: - when logging hits line file:N, emit a stack trace.
--log_dir="" - If non-empty, write log files in this directory.
--logtostderr=false - log to standard error instead of files.
--stderrthreshold=0 - logs at or above this threshold go to stderr.
--v=0 - log level for V logs.
--vmodule - comma-separated list of pattern=N settings for file-filtered logging.

jut-cadvisor-agent can also be run from Docker Hub. Assuming you have cAdvisor running in a container named "cadvisor", this docker run command will start jut-cadvisor-agent to poll cAdvisor and send metrics/events to your jut Data Node:

 docker run --detach=true --name jut-cadvisor-agent \
 --net=container:cadvisor jutd/jut-cadvisor-agent:latest \
 --apikey=<apikey> --datanode=<jut data node hostname>

Metrics Collected

jut-cadvisor-agent can be configured to collect and transmit a default set of important metrics for each container, or a much larger set of full metrics.

The default metrics include:

  • CPU: total/user/system, load_average
  • Memory: usage/working set
  • Network: bytes/packets sent overall (not per-interface)

The Full Set of metrics adds the following:

  • CPU: per-cpu usage
  • Details on disk I/O utilization
  • Memory: page fault counts
  • Network: per-interface information
  • Filesystem: per-filesystem I/O information
  • task information (sleeping/running/etc)

Logging

jut-cadvisor-agent uses [glog] (https://github.com/golang/glog) for logging. When run inside a container, jut-cadvisor-agent can be configured to log to standard error.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/golang/glog
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
_workspace/src/github.com/google/cadvisor/client
TODO(cAdvisor): Package comment.
TODO(cAdvisor): Package comment.
_workspace/src/github.com/google/cadvisor/client/v2
Client library to programmatically access cAdvisor API.
Client library to programmatically access cAdvisor API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL