Deploy the OTEL collector and restart Groundplex nodes

Deploy the OTEL collector on Docker and redeploy the Groundplex nodes.

The final steps include starting the OTEL collector and restarting the Groundplex nodes. If you need to save the Groundplex container data, you can optionally commit the current image before restarting.

Start the OTEL collector

On each Groundplex node, run the following command:

docker-compose -f /otelcol/docker-compose.yaml up -d

Optionally commit the Groundplex image

Use the following commands to save the current image:

docker ps # get old container id
docker commit <old_container_id> <your_snaplex_image>

For example:

docker commit 96b86b0d541b snaplogic/snaplex:main-24152

If necessary, you can later restart the container using the commit number and container ID.

Restart the Snaplex service on Docker

You can use docker-compose or docker run to restart the Snaplex service on each host. Either way, you need to provide the environment variable that points to the OTEL collector: OTEL_GRPC_URL=http://172.17.0.1:4317

Use docker-compose

To use docker-compose to connect to the OTEL service and restart the Snaplex service:

  1. Edit the docker-compose file and add OTEL_GRPC_URL=http://172.17.0.1:4317 as an Environment value for the SnapLogic service. The following shows an example:
    version: '3.8'
    
    services:
      jcc:
        image: registry.hub.docker.com/snaplogic/snaplex:main-24960
        hostname: <your_hostname>
        container_name: snaplex
        network_mode: bridge
        restart: always
        volumes:
          - /opt/snaplogic/config:/opt/snaplogic/etc
          - /opt/snaplogic/run/log:/opt/snaplogic/run/log
        environment:
          - OTEL_GRPC_URL=http://172.17.0.1:4317
        memswap_limit: -1
        ports:
          - 8081:8081
          - 8084:8084
          - 8089:8089
    ## then rerun by 
  2. Run the commands to stop and restart the service: docker-compose down && docker-compose up -d

Use Docker run

From the SnapLogic installation directory:

  1. Stop and remove the old container: docker rm -f <old container id>
  2. Run the new container with the OTEL environment variable:
    docker run -d -e OTEL_GRPC_URL=http://<otel-collector-ip>:4317
    For example, if the OTEL collector and Groundplex are deployed on the same host:
    OTEL_GRPC_URL=http://172.17.0.1:4317

Next, Observe in New Relic.