All Projects → remind101 → dockerstats

remind101 / dockerstats

Licence: other
Easy scraping for the Docker stats api.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects

Dockerstats

Dockerstats is a simple docker container for collecting metrics from the Docker Stats API and sending them elsewhere. It supports adapters for configuring where you want metrics to be sent. It's heavily inspired by logspout and is roughly similar to cadvisor but simpler.

Currently, the following adapters are provided:

  • Log: An adapter that logs stats to stdout. This adapter can be useful if you're already using something like logspout to collect logs from containers. The format can be configured via the STAT_TEMPLATE environment variable. The default template is a template that will log stats in l2met format. Here's an example set of metrics with the default template.
  • Statsd: TODO
  • Librato: TODO

Usage

Simply run the container and mount the docker socket:

$ docker run --name="dockerstats" \
    --volume=/var/run/docker.sock:/tmp/docker.sock \
    remind101/dockerstats

Metrics

The following metrics will be created:

Network.RxDropped
Network.RxBytes
Network.RxErrors
Network.TxPackets
Network.RxPackets
Network.TxErrors
Network.TxBytes

MemoryStats.Stats.TotalPgmafault
MemoryStats.Stats.Cache
MemoryStats.Stats.MappedFile
MemoryStats.Stats.TotalInactiveFile
MemoryStats.Stats.Pgpgout
MemoryStats.Stats.Rss
MemoryStats.Stats.TotalMappedFile
MemoryStats.Stats.Writeback
MemoryStats.Stats.Unevictable
MemoryStats.Stats.Pgpgin
MemoryStats.Stats.TotalUnevictable
MemoryStats.Stats.Pgmajfault
MemoryStats.Stats.TotalRss
MemoryStats.Stats.TotalRssHuge
MemoryStats.Stats.TotalWriteback
MemoryStats.Stats.TotalInactiveAnon
MemoryStats.Stats.RssHuge
MemoryStats.Stats.HierarchicalMemoryLimit
MemoryStats.Stats.TotalPgfault
MemoryStats.Stats.TotalActiveFile
MemoryStats.Stats.ActiveAnon
MemoryStats.Stats.TotalActiveAnon
MemoryStats.Stats.TotalPgpgout
MemoryStats.Stats.TotalCache
MemoryStats.Stats.InactiveAnon
MemoryStats.Stats.ActiveFile
MemoryStats.Stats.Pgfault
MemoryStats.Stats.InactiveFile
MemoryStats.Stats.TotalPgpgin
MemoryStats.MaxUsage
MemoryStats.Usage
MemoryStats.Failcnt
MemoryStats.Limit

CPUStats.CPUUsage.UsageInUsermode
CPUStats.CPUUsage.TotalUsage
CPUStats.CPUUsage.UsageInKernelmode
CPUStats.SystemCPUUsage
CPUStats.ThrottlingData.Periods
CPUStats.ThrottlingData.ThrottledPeriods
CPUStats.ThrottlingData.ThrottledTime

Roadmap

  • Add a statsd drain.
  • BlkioStats
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].