KapacitorEstimated reading time: 7 minutes
Kapacitor is an open source framework for processing, monitoring, and alerting on time series data.
GitHub repo: https://github.com/influxdata/influxdata-docker
This content is imported from the official Docker Library docs, and is provided by the original uploader. You can view the Docker Store page for this repo at https://store.docker.com/images/kapacitor.
Supported tags and respective
For detailed information about the published artifacts of each of the above supported tags (image metadata, transfer size, etc), please see the
repos/kapacitor directory in the
docker-library/repo-info GitHub repo.
For more information about this image and its history, please see the relevant manifest file (
library/kapacitor). This image is updated via pull requests to the
docker-library/official-images GitHub repo.
Kapacitor is an open source data processing engine written in Go. It can process both stream and batch data.
Using this image
Using the default configuration
Start the Kapacitor container with default options:
$ docker run -p 9092:9092 kapacitor
Start the Kapacitor container sharing the data directory with the host:
$ docker run -p 9092:9092 \ -v $PWD:/var/lib/kapacitor \ kapacitor
$PWD to the directory where you want to store data associated with the Kapacitor container.
You can also have Docker control the volume mountpoint by using a named volume.
$ docker run -p 9092:9092 \ -v kapacitor:/var/lib/kapacitor \ kapacitor
Kapacitor can be either configured from a config file or using environment variables. To mount a configuration file and use it with the server, you can use this command:
Generate the default configuration file:
$ docker run --rm kapacitor kapacitord config > kapacitor.conf
Modify the default configuration, which will now be available under
$PWD. Then start the Kapacitor container.
$ docker run -p 9092:9092 \ -v $PWD/kapacitor.conf:/etc/kapacitor/kapacitor.conf:ro \ kapacitor
$PWD to the directory where you want to store the configuration file.
For environment variables, the format is
KAPACITOR_$SECTION_$NAME. All dashes (
-) are replaced with underscores (
_). If the variable isn’t in a section, then omit that part. If the config section is an array, use a number to set the nth value in the configuration file.
KAPACITOR_HOSTNAME=kapacitor KAPACITOR_LOGGING_LEVEL=INFO KAPACITOR_REPORTING_ENABLED=false KAPACITOR_INFLUXDB_0_URLS_0=http://influxdb:8086
Find more about configuring Kapacitor here
- 9092 TCP – HTTP API endpoint
Subscriptions allow InfluxDB to push data to Kapacitor for faster alerting instead of requiring Kapacitor to pull data from InfluxDB.
These examples assume you are using a custom configuration file that takes advantage of Docker’s built-in service discovery capability. In order to do so, we’ll first create a new network:
$ docker network create influxdb
Next, we’ll start our InfluxDB container named
$ docker run -d --name=influxdb \ --net=influxdb \ influxdb
Start the Kapacitor container with the container hostname matching the container name so Kapacitor can automatically create subscriptions correctly and with the
KAPACITOR_INFLUXDB_0_URLS_0 value set to point at InfluxDB.
$ docker run -p 9092:9092 \ --name=kapacitor \ -h kapacitor \ --net=influxdb \ -e KAPACITOR_INFLUXDB_0_URLS_0=http://influxdb:8086 \ kapacitor
You can also start Kapacitor sharing the same network interface of the InfluxDB container. If you do this, Docker will act as if both processes were being run on the same machine.
$ docker run -p 9092:9092 \ --name=kapacitor \ --net=container:influxdb \ kapacitor
When run like this, InfluxDB can be communicated with over
CLI / SHELL
Start the container:
$ docker run --name=kapacitor -d -p 9092:9092 kapacitor
Run another container linked to the
kapacitor container for using the client. Set the env
KAPACITOR_URL so the client knows how to connect to Kapacitor. Mount in your current directory for accessing TICKscript files.
$ docker run --rm --net=container:kapacitor \ -v $PWD:/root -w=/root -it \ kapacitor bash -l
Then, from within the container, you can use the
kapacitor command to interact with the daemon.
See this for a more detailed getting started guide with Kapacitor.
kapacitor images come in many flavors, each designed for a specific use case.
This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. This tag is based off of
buildpack-deps is designed for the average user of docker who has many images on their system. It, by design, has a large number of extremely common Debian packages. This reduces the number of packages that images that derive from it need to install, thus reducing the overall size of all images on your system.
This image is based on the popular Alpine Linux project, available in the
alpine official image. Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.
This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use musl libc instead of glibc and friends, so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn’t have an issue with this, so this variant is usually a very safe choice. See this Hacker News comment thread for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.
To minimize image size, it’s uncommon for additional related tools (such as
bash) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the
alpine image description for examples of how to install packages if you are unfamiliar).
View license information for the software contained in this image.
Supported Docker versions
This image is officially supported on Docker version 17.04.0-ce.
Support for older versions (down to 1.6) is provided on a best-effort basis.
Please see the Docker installation documentation for details on how to upgrade your Docker daemon.
If you have any problems with or questions about this image, please contact us through a GitHub issue. If the issue is related to a CVE, please check for a
cve-tracker issue on the
official-images repository first.
You can also reach many of the official image maintainers via the
#docker-library IRC channel on Freenode.
You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.
Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.
Documentation for this image is stored in the
kapacitor/ directory of the
docker-library/docs GitHub repo. Be sure to familiarize yourself with the repository’s
README.md file before attempting a pull request.