Upgrade Agent Using Docker

This page details step to upgrade Bleemeo Agent when installation used the Docker method.

Before upgrading 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 upgrade your agent, you may use docker run command or docker-compose.

Using Docker Run Command

If you run Bleemeo agent using Docker image, you will need to pull again the images to get their latest versions before restarting Docker container. Containers do not hold any state data; the agent state is stored on your host, thanks to -v /var/lib/bleemeo:/var/lib/bleemeo.

Pulling new images:

$ docker pull telegraf bleemeo/bleemeo-agent

Remove old containers:

$ docker stop telegraf bleemeo-agent
$ docker rm telegraf bleemeo-agent

Re-create containers. It the same steps as installation with Docker method:

$ 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

Update 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 should also update 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"
  graphite_tag_support = true

[[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 pull new images:

$ docker-compose pull

Run Docker compose:

docker-compose up -d