Skip to content

Docker

Setup your collectors!

Epoch collectors can be run in both containerized as well as non-containerized environments. Only one collector is needed per host (VM or bare metal OS). Please follow the environment specific installation instructions below.

Installation

Before you begin: Consult Supported Platforms and Collector Requirements

  • Run the following command.
docker run -td \
       --name=epoch_collectors \
       --net=host \
       -v /var/run/docker.sock:/var/run/docker.sock:ro \
       -v /proc/:/host/proc/:ro \
       -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
       --cap-add=NET_RAW \
       --cap-add=NET_ADMIN \
       --ulimit core=0 \
       -e DEPLOY_ENV="docker" \
       -e SD_BACKEND="docker" \
       -e EPOCH_INTERFACE=any \
       -e EPOCH_ANALYSIS_DEPTH=layer7 \
       -e EPOCH_L7_SAMPLINGRATE=20  \
       -e EPOCH_AOC_HOST=${your_epoch_host} \
       -e EPOCH_ORGANIZATION_ID=${organizationId} \
       gcr.io/nutanix-epoch/collectors:latest
  • If you are running Amazon Linux, run the following command.
docker run -td \
       --name=epoch_collectors \
       --net=host \
       -v /var/run/docker.sock:/var/run/docker.sock:ro \
       -v /proc/:/host/proc/:ro \
       -v /cgroup/:/host/sys/fs/cgroup:ro \
       --cap-add=NET_RAW \
       --cap-add=NET_ADMIN \
       --ulimit core=0 \
       -e DEPLOY_ENV="docker" \
       -e SD_BACKEND="docker" \
       -e EPOCH_INTERFACE=any \
       -e EPOCH_ANALYSIS_DEPTH=layer7 \
       -e EPOCH_L7_SAMPLINGRATE=20   \
       -e EPOCH_AOC_HOST=${your_epoch_host} \
       -e EPOCH_ORGANIZATION_ID=${organizationId} \
       gcr.io/nutanix-epoch/collectors:latest
  • If you are using the overlayfs storage driver, install the collectors with the --tmpfs flag.
docker run -td \
       --name=epoch_collectors \
       --net=host \
       --tmpfs /opt/nutanix/epoch/collectors/run \
       -v /var/run/docker.sock:/var/run/docker.sock:ro \
       -v /proc/:/host/proc/:ro \
       -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
       --cap-add=NET_RAW \
       --cap-add=NET_ADMIN \
       -e DEPLOY_ENV="docker" \
       -e SD_BACKEND="docker" \
       -e EPOCH_INTERFACE=any \
       -e EPOCH_ANALYSIS_DEPTH=layer7 \
       -e EPOCH_L7_SAMPLINGRATE=20    \
       -e EPOCH_AOC_HOST=${your_epoch_host} \
       -e EPOCH_ORGANIZATION_ID=${organizationId} \
       gcr.io/nutanix-epoch/collectors:latest

Installing Integrations

Creating and Persisting the Config File

Below, we list some methods of creating the config file such that it will be persisted across container restarts.

If the service you are integrating with is running as a container, its integration likely supports autoconf. Thus, your integrations config file should reside in the /etc/epoch-dd-agent/conf.d/auto_conf directory of your collectors. Also, you should use%%host%% and %%port%% in place of any hardcoded host and port parameters in the config file.

Remember to use the Configuration section from the instructions page for your integration as reference for the name and contents of the config file.

Custom Images

Create a custom container image that derives from the base collector image provided by Epoch. The following is a template Dockerfile:

  # Collectors follow the same versioning scheme as the AOC, replace x.x.x with your AOC version
  FROM epoch/collectors:stable-x.x.x

  # Copy the ".yaml" file(s) at collector build time
  COPY *.yaml /etc/epoch-dd-agent/conf.d/auto_conf

Volume-mounting

Volume-mount the configuration directory from the host, such that the yaml configuration fields can be provided directly on the host file system. You will need to provide the following parameter to the container's run command:

  -v /etc/epoch-dd-agent/conf.d/:/etc/epoch-dd-agent/conf.d/:ro

Running the Integration

After you have persisted the config file, the integration should start automatically when the collector image itself is run.

Checking Configuration

Check to make sure that all yaml files are valid with the following command:

docker exec epoch_collectors /etc/init.d/epoch-collectors configcheck

Checking Runtime

Check to make sure that the integration is running correctly with the following command:

docker exec epoch_collectors /etc/init.d/epoch-collectors info

The output of the info command should contain a section similar to the following:

    Checks
    ======
      [...]
      <name-of-integration>
      ----------
          - instance #0 [OK]
          - Collected 8 metrics & 0 events

Reporting Troubleshooting Information

If you are having issues with your collectors, you can run an inspect command which will gather troubleshooting information about the collectors, as well as any necessary logs.

  1. Generate the tar file.

    docker exec epoch_collectors /etc/init.d/epoch-collectors inspect
    

    The tar file is created in the /tmp directory, and the file name begins with epoch-collectors-inspection.

  2. Get the exact name of the tar file.

    docker exec epoch_collectors ls /tmp
    
  3. Retrieve the tar file.

    docker cp epoch_collectors:/tmp/<filename-of-inspect-tarball> .
    
  4. Send the tar file to Epoch support through email at epoch-support@nutanix.com

Uninstallation

To uninstall the collectors, run the following command:

docker rm -f epoch_collectors