Sensor via Docker
Install on Linux host via Docker
Prerequisites
Before installing the Sensor on a Linux host via Docker, ensure you have:
- Docker Engine version
18.03.0or higher - Admin (or
sudo) privileges on the Docker host
1. Install Sensor
NOTE: If you are installing the Satellite and Sensor on the same Linux host, do NOT use
localhostas the satellite-address below. Usehost.docker.internal, or the Linux host's IP address or domain name instead. This is required because the Sensor runs inside a Docker container, andlocalhostresolves to the Sensor container's IP address rather than the Linux host.
# Replace '<satellite-address>' with the values you noted down from the Satellite install
#
# Specify below the 'Application Name' chosen earlier. Do not quote the 'Application Name'
#
sudo docker run --restart unless-stopped \
-v /sys/kernel/debug:/sys/kernel/debug \
-v /proc:/host/proc \
--add-host host.docker.internal:host-gateway \
--privileged \
--detach \
levoai/ebpf_sensor:0.48.2 \
--host-proc-path /host/proc/ \
--satellite-url <satellite-address> \
--organization-id <Org ID> \
--workspace-id <Workspace ID> \
--env <'application-environment'>
NOTE:
The default collector address for Docker-based Sensor installations is https://collector.levo.ai.
This address assumes that Levo is hosting the Satellite for you. You must also specify an Organization ID and Workspace ID when starting the Sensor (using the --organization-id and --workspace-id flags).
Alternatively, you may host the Satellite yourself and specify the collector address in the self-hosted Satellite to direct the Sensor's traffic to it.
2. Verify Connectivity with Satellite
Execute the following command to check connectivity health:
# Please specify the actual container name for levoai-sensor below
docker logs <levoai-sensor container name> | grep "Initial connection with Collector"
If connectivity is healthy, you should see output similar to the following:
2022/06/13 21:15:40 729071 INFO [ebpf_sensor.cpp->main:120] Initial connection with Collector was successful.
If there are no errors, proceed to the next step.
Sensor Lifecycle Management
Uninstall Sensor
# Get the container id of the Sensor
docker ps | grep "levoai/ebpf_sensor"
# Remove the Sensor
docker rm -f <container id from docker ps step above>
Get Sensor Logs
# Get the container id of the Sensor
docker ps | grep "levoai/ebpf_sensor"
sudo docker logs <container id from docker ps step above>
Upgrade Sensor
- Uninstall Sensor
- Pull new Sensor image
docker pull levoai/ebpf_sensor:latest
- Reinstall Sensor
Manage Sensor Configuration
Refer to Sensor Configuration and Applying Configuration Changes for detailed instructions.