Install Agent Using Docker

We recommend installing agent using standard method or instructions on this page if you use Docker. But if those methods don’t fit your needs, see manual method which explains how to install the Bleemeo agent with standard tools.

Before installing Bleemeo agent, please check that you meet the system requirements.

Bleemeo provides official images on Docker Hub and on Docker Store.

Bleemeo Agent is a Docker Certified Container. The Docker Certification program is a framework for partners to integrate and certify their technology to the Docker Enterprise Edition (EE) commercial platform.

Bleemeo Agent is a Docker Certified Container

To deploy your agent, you may use docker run command or docker-compose.

Using Docker Run Command

There are two Docker images: one for Telegraf and one for the agent itself. They both require some special options needed to monitor your Docker host and other Docker containers:

$ TELEGRAF_CONF_DIR=/var/lib/telegraf
$ mkdir -p ${TELEGRAF_CONF_DIR}/telegraf.d
$ wget https://docs.bleemeo.com/_downloads/telegraf.conf -O ${TELEGRAF_CONF_DIR}/telegraf.conf

$ docker run -d --name="bleemeo-telegraf" \
    -v ${TELEGRAF_CONF_DIR}:/etc/telegraf -v /:/hostroot:ro -v /var/run/docker.sock:/var/run/docker.sock:ro \
    --net=host --pid=host telegraf telegraf --config-directory /etc/telegraf/telegraf.d

$ docker run -d --name="bleemeo-agent" \
    -v /var/lib/bleemeo:/var/lib/bleemeo -v /var/run/docker.sock:/var/run/docker.sock -v /:/hostroot:ro -v ${TELEGRAF_CONF_DIR}:/etc/telegraf \
    -e BLEEMEO_AGENT_BLEEMEO_ACCOUNT_ID=<YOUR-ACCOUNT-ID> -e BLEEMEO_AGENT_BLEEMEO_REGISTRATION_KEY=<YOUR-REGISTRATION-KEY> \
    -e BLEEMEO_AGENT_TELEGRAF_DOCKER_NAME="bleemeo-telegraf" \
    --pid=host --net=host bleemeo/bleemeo-agent

Using Docker Compose

You need to get the Docker compose file. Or copy/paste the following content:

version: '2'

services:

    telegraf:
        command: --config-directory /etc/telegraf/telegraf.d
        container_name: telegraf
        image: telegraf
        network_mode: "host"
        pid: "host"
        ports:
            - "8125:8125/udp"
        volumes:
            - bleemeo-telegraf-configuration:/etc/telegraf/telegraf.d:ro
            - /:/hostroot:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./telegraf.conf:/etc/telegraf/telegraf.conf

    bleemeo-agent:
        image: bleemeo/bleemeo-agent
        environment:
            - BLEEMEO_AGENT_BLEEMEO_ACCOUNT_ID=<YOUR-ACCOUNT-ID>
            - BLEEMEO_AGENT_BLEEMEO_REGISTRATION_KEY=<YOUR-REGISTRATION-KEY>
        network_mode: "host"
        pid: "host"
        ports:
            - "2003:2003"
            - "8015:8015"
        volumes:
            - bleemeo-telegraf-configuration:/etc/telegraf/telegraf.d/
            - /:/hostroot:ro
            - bleemeo-agent-data:/var/lib/bleemeo
            - /var/run/docker.sock:/var/run/docker.sock

volumes:
    bleemeo-agent-data:
        external: false

    bleemeo-telegraf-configuration:
        external: false

Edit the docker-compose file, and change <YOUR-ACCOUNT-ID> and <YOUR-REGISTRATION-KEY>.

You also need to telegraf configuration file or copy/paste the following content:

[agent]
  interval = "10s"
  round_interval = true

  metric_batch_size = 1000

  metric_buffer_limit = 10000

  collection_jitter = "0s"

  flush_interval = "10s"
  flush_jitter = "0s"

  precision = ""

  debug = false
  quiet = false
  logfile = ""

  hostname = ""
  omit_hostname = false

[[outputs.graphite]]
  servers = ["localhost:2003"]
  prefix = "telegraf"

[[inputs.cpu]]
  percpu = true
  totalcpu = true
  collect_cpu_time = false

[[inputs.disk]]
  ignore_fs = ["tmpfs", "devtmpfs"]

[[inputs.diskio]]

[[inputs.kernel]]

[[inputs.mem]]

[[inputs.processes]]

[[inputs.swap]]

[[inputs.system]]

[[inputs.net]]

Then run Docker compose:

docker-compose up -d