How does eG Enterprise Monitor Docker?

eG Enterprise is capable of monitoring both Standalone Docker Host as well as the Docker Hosts managed by a Kubernetes Cluster by installing an eG agent as a container on the Docker Hosts. To monitor a Standalone Docker Host, administrators need to install the eG agent container published in the public Docker repository on the Docker Host. To monitor Docker Hosts managed by a Kubernetes Cluster, administrators need to deploy a DaemonSet which will automatically install the eG agent as a container on all the Docker Hosts in the Cluster. A DaemonSet ensures that all (or some) Nodes run a copy of the eG agent container. As Docker Hosts are added to the Kubernetes cluster, the DaemonSet automatically runs a copy of the eG agent container on those Docker Hosts.

How does eG Enterprise monitor Docker Hosts managed by Kubernetes Cluster?

To monitor the Docker Hosts managed by a Kubernetes Cluster, administrators need to deploy a DaemonSet which will automatically install the eG agent container (published on the Docker repository) on all the Docker Hosts.

The steps that follow will discuss in detail on how the eG agent container helps in monitoring the Docker Hosts managed by a Kubernetes cluster:

  1. Login to the master node of the Kubernetes Cluster.
  2. Access the following URL to download the agent.yaml file: https://raw.githubusercontent.com/egmonitoring/container/master/agent.yaml
  3. The next step is to edit the downloaded agent.yaml file so as to enable the eG agent container to communicate with the eG manager. In the env: section of the agent.yaml file, specify the Host IP/Fully Qualified Domain name of the eG manager against the value option for the EG_MANAGER parameter.

    env:

    - name: EG_MANAGER

    value: "<Host IP/Fully qualified domain name of the eG manager>"

    For example, if the Host IP of the eG manager is 192.168.8.72, then, specify the IP address against the value parameter.

    env:

    - name: EG_MANAGER

    value: "192.168.8.72"

    For example, if the Fully qualified domain name of the eG manager is cloud.eginnovations.com, then, specify the same against the value parameter.

    env:

    - name: EG_MANAGER

    value: "cloud.eginnovations.com"

  4. Then, specify the port at which the eG manager listens to. If the eG manager listens on port 7077, then, specify 7077 against the value below the EG_MANAGER_PORT parameter.

    - name: EG_MANAGER_PORT

    value: "7077"

  5. Next, indicate whether the eG agent container is to use SSL for communicating with the eG manager. If yes, specify true against the value option below the EG_MANAGER_SSL parameter. By default, false is set against the value option.

    - name: EG_MANAGER_SSL

    value: "true"

  6. The next step is to specify an eG Agent Identifier ID. In an Enterprise setup or a multi-tenant setup, once a user/tenant - e.g., a user representing a customer / a department / a domain - registers with eG Enterprise to use its monitoring services, eG automatically generates a unique Agent Identifier ID and assigns the same to that user/tenant. If that user/tenant later logs into the eG management console using the registered credentials (email ID and password) and downloads the eG agent container, each eG agent container so downloaded is automatically tagged with that Agent Identifier ID. The downloaded eG agent container, once installed and configured, will automatically start discovering the Docker Hosts. eG Enterprise auto-manages the Docker Hosts and auto-assigns the Docker Hosts to the user/tenant who has the same eG Agent Identifier ID as that of the eG agent container that discovered the host.

    To obtain the eG Agent Identifier ID, the user/tenant needs to log in to the eG management console and click the Docker tile in the What would you like to Discover /Monitor? page of the eG administrative interface. In Figure 1 that appears, the eG Agent Identifier ID associated with the user/tenant is available.

    Figure 1 : Identifying the value of the EG_AGENT_IDENTIFIER ID parameter

    This eG Agent Identifier ID should be specified against the value option of the EG_AGENT_IDENTIFIER_ID parameter.

    - name: "EG_AGENT_IDENTIFIER_ID"

    value: "<Unique ID associated with the user/tenant>"

  7. After the required credentials are specified, execute the following command on the master node of the Kubernetes Cluster:

    kubectl create -f egagent.yaml

How does eG Enterprise monitor a Standalone Docker Host?

If you wish to install the eG agent container directly on a standalone Docker Host, then, you need to execute the following command on the Docker Host:

docker run -d --network host --pid=host --ipc=host -v /var/run/docker.sock:/var/run/docker.sock:ro -v /proc/:/host/proc/:ro --env EG_MANAGER=<Host IP/Fully qualified domain name of the eG manager> --env EG_MANAGER_PORT=<port on which the eG manager listens> --env EG_MANAGER_SSL=<true/false> --env EG_AGENT_IDENTIFIER_ID=<Unique ID associated with the user/tenant> --env JVM_MEMORY=512 eginnovations/<version of the eG manager>:latest

An example command is mentioned below:

docker run -d --network host --pid=host --ipc=host -v /var/run/docker.sock:/var/run/docker.sock:ro -v /proc/:/host/proc/:ro --env EG_MANAGER=192.168.8.72 --env EG_MANAGER_PORT=7077 --env EG_MANAGER_SSL=true --env EG_AGENT_IDENTIFIER_ID=ecozxmw5q4yh5typqkioh3ww6pafrf62 --env JVM_MEMORY=512 eginnovations/716:latest

Note:

eG Enterprise provides monitoring support to Docker hosts on Linux platforms only, and not on Windows.