Skip to content

redmatter/docker-collectd-elk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Host & Container Monitoring

This is the source for redmatter/collectd-elk docker image. It facilitates the collection of docker statistics into ELK stack.

How to use it?

Th prerequisite to using this would be to have a functional ELK stack. For use in development environment an ELK stack can be deployed using the redmatter/docker-elk project. Once deployed, use the commands below to deploy the collectd-elk container.

export LOGSTASH_NETWORK=<network-name>
docker-compose up -d

Here the network name to be defined in LOGSTASH_NETWORK would be dockerelk_logstash by default. Use docker network ls to find out the exact name.

NOTE: If you have a hostname specified with hyphens (-), the hostname will be modified to remove them. For example, if hostname is api-01, the host field in index entries will be api01

How to configure it?

Environment Variables

The image supports a couple of environment variables to tune its behaviour.

COLLECTD_HOST

Sets the hostname added to each event generated by collectd. If this variable is not set, and if you have /etc/hostname volume mounted in as /host/hostname (as seen in the docker-compose.yml), or if you have the host's /proc volume mounted in as /host/proc, then they are utilised to figure out the hostname. Otherwise it falls back to the default behaviour, which is to use container's ID.

COLLECTD_INTERVAL_SECONDS

Controls how often the stats are collected and exposed by collectd. By default, it is 10 seconds.

Config file

You can also configure it via collectd config in /etc/collectd/collectd.conf.

About

Docker host and container monitoring using collectd

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages