Skip to content

mbruzek/layer-dockerbeat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerbeat

A lightweight, open source shipper for docker daemon data. Dockerbeat polls the Docker Engine daemon, and sends cpu, network, memory, and host information to Logstash for further parsing and enrichment or to Elasticsearch for centralized storage and analysis.

Usage

Dockerbeat can be added to any principal charm thanks to the wonders of being a subordinate charm. The following usage example will deploy the elk stack, so we can visualize our container data once we've established the link between dockerbeat and Logstash

juju deploy ~containers/bundle/elk-stack
juju deploy ~containers/swarm-core
juju deploy ~containers/trusty/dockerbeat
juju add-relation dockerbeat:beats-host swarm
juju add-relation dockerbeat logstash

Deploying the minimal Beats formation

If you do not need data buffering and alternate transforms on your data thats being shipped to ElasticSearch you can simply deploy the 'beats-core' bundle which stands up Elasticsearch, Kibana, and the three known working Beats subordinate services.

juju deploy ~containers/bundle/beats-core
juju deploy ~containers/bundle/swarm-core
juju deploy ~containers/trusty/dockerbeat
juju add-relation filebeat:beats-host swarm
juju add-relation topbeat:beats-host swarm
juju add-relation packetbeat:beats-host swarm
juju add-relation dockerbeat:beats-host swarm

A note about the beats-host relationship

The Beats suite of charms leverage the implicit "juju-info" relation interface which is special and unique in the context of subordinates. This is what allows us to relate the beat to any host, but may have some display oddities in the juju-gui. Until this is resolved, it's recommended to relate beats to their principal services using the CLI

Testing the deployment

The services provide extended status reporting to indicate when they are ready:

juju status --format=tabular

This is particularly useful when combined with watch to track the on-going progress of the deployment:

watch -n 0.5 juju status --format=tabular

The message for each unit will provide information about that unit's state. Once they all indicate that they are ready, you can navigate to the kibana url and view the streamed log data from the Ubuntu host.

juju status kibana --format=yaml | grep public-address

open http://<kibana-ip>/ in a browser and begin creating your dashboard visualizations

Scale Out Usage

This bundle was designed to scale out. To increase the amount of log storage and indexers, you can add-units to elasticsearch.

juju add-unit elasticsearch

You can also increase in multiples, for example: To increase the number of Logstash parser/buffer/shipping services:

juju add-unit -n 2 logstash

To monitor additional hosts, simply relate the Dockerbeat subordinate

juju add-relation dockerbeat:beats-host my-charm

DockerBeat Delivery

This charm makes use of Resources. A juju 2.0 feature. When deploying this charm on a juju 2.0 enabled controller, the upstream Ingensi dockerbeat binary will ship with the charm targeted at X86 hosts. If you are on another architecture you may need to compile, and juju attach a new binary for your arch.

1.25 Compatibility

Alternatively, on juju 1.25 hosts, this charm supports a configurable URL and SHA1 sum configuration option to attempt to fetch. Configured for a release from the Ingensi github repository.

Contact information

Need Help?

About

DockerBeat is a light weight daemon that monitors docker daemon metrics, this is the layer to build a dockerbeat charm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.7%
  • Shell 3.3%