Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update installation instructions apt and yum #280

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sudo apt update
### 3. Download/install Sensor artifacts

```bash
sudo apt install levo-ebpf-sensor=0.43.6
sudo apt install levo-ebpf-sensor=0.45.4
```

### 4. Start the Sensor
Expand All @@ -44,38 +44,26 @@ Please take a look at the [Running the Sensor as a Systemd Service](/install-tra

## Sensor Lifecycle Management

### Configure Satellite Address (`host:port` information)
### Configure Satellite Address, Organization-Id and Environment

The Satellite address is configured in `/etc/levo/sensor/config.yaml`. The default `host:port` for Satellite is `localhost:4317`.
The Satellite address is configured in `/etc/default/levo-ebpf-sensor`. The default Satellite URL is `https://collector.levo.ai`.

Edit `/etc/levo/sensor/config.yaml`, set `satellite-url` (under Satellite Settings) to the desired `host:port` value,
and set `organization-id` to the Organization ID fetched from the Levo Dashboard
Edit `/etc/default/levo-ebpf-sensor`, set the `LEVO_SATELLITE_URL` variable to the desired `host:port` value,
and set the `LEVO_ORG_ID` to the Organization ID fetched from the Levo Dashboard.
Set `LEVO_ENV` to the desired environment name in which you wish to see you applications on the Levo Dashboard.

```bash
...
organization-id: "your Org ID"
# --------------------------------------------------------------------------------------------
# Satellite Settings:
# --------------------------------------------------------------------------------------------
# host:port for the collector service receiving the sensor's API traces.
# mention the scheme http/https if you decide not to use gRPC for sensor satellite communication
satellite-url: <set to desired host:port value>
# --------------------------------------------------------------------------------------------
LEVO_ENV="your-env"
LEVO_SATELLITE_URL="your-satellite-url"
LEVO_ORG_ID="your-org-id"
...
```

### Configure sensor environment
The eBPF sensor environment is configured in `/etc/default/levo-ebpf-sensor`. The default env value is `staging`
Additional sensor configs are present in the file `/etc/levo/sensor/config.yaml`

Edit `/etc/default/levo-ebpf-sensor`, and set `LEVO_ENV` to the desired env value (eg. `prod`, `qa`)

```bash
# Environment Variables for levo-ebpf-sensor.service
MALLOC_CONF="background_thread:true,narenas:1,tcache:false,dirty_decay_ms:0,muzzy_decay_ms:0,abort_conf:true"
LEVO_ENV="staging"
```

**A Sensor *restart* is required for this to take effect.**
**A Sensor *restart* is required for the config changes to take effect.**


### Start Sensor
Expand Down Expand Up @@ -107,6 +95,11 @@ sudo cat syslog | grep 'levo-ebpf-sensor'
cat /etc/levo/sensor/config.yaml
```

### Show Sensor Environment file
```bash
cat /etc/default/levo-ebpf-sensor
```

### Uninstall Sensor
```bash
sudo apt remove --purge levo-ebpf-sensor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ title: Install eBPF Sensor on Docker | Levo.ai Documentation
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.40.0 \
--privileged --detach levoai/ebpf_sensor:0.45.4 \
--host-proc-path /host/proc/ \
--satellite-url <satellite-address> \
--organization-id <Org ID> \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,26 @@ sidebar_position: 6

## Running the Sensor as a Systemd Service {#running-sensor-systemd}

### 1. Configure Satellite Address
The Satellite (collector) address is configured in `/etc/levo/sensor/config.yaml`.
### Configure Satellite Address, Organization-Id and Environment

#### NOTE:
The default address for the collector in Systemd installations is `https://collector.levo.ai`.
This address assumes that Levo is hosting the Satellite for you, and you must also specify an organization ID (`organization-id`) via the config file.
If you wish, you may also host the Satellite yourself and specify the address of the collector in the self-hosted Satellite to direct the Sensor's traffic to it.
The Satellite address is configured in `/etc/default/levo-ebpf-sensor`. The default Satellite URL is `https://collector.levo.ai`.

Edit `/etc/default/levo-ebpf-sensor`, set the `LEVO_SATELLITE_URL` variable to the desired `host:port` value,
and set the `LEVO_ORG_ID` to the Organization ID fetched from the Levo Dashboard.
Set `LEVO_ENV` to the desired environment name in which you wish to see you applications on the Levo Dashboard.

Edit `/etc/levo/sensor/config.yaml`, set `satellite-url` (under Satellite Settings) to the desired `host:port` value,
and set `organization-id` to the Organization ID fetched from the Levo Dashboard

```yaml
```bash
...
organization-id: <Org ID>
# --------------------------------------------------------------------------------------------
# Satellite Settings:
# --------------------------------------------------------------------------------------------

# Levo Organization ID. This must be specified when the collector is hosted by Levo.
# organization-id: ""

# host:port for the collector service receiving the Sensor's API traces.
satellite-url: <Use the default (https://collector.levo.ai) or set to a custom address>
LEVO_ENV="your-env"
LEVO_SATELLITE_URL="your-satellite-url"
LEVO_ORG_ID="your-org-id"
...
```
**Note**: If you change the Satellite address later, you have to restart the Sensor, since it's not a hot property.

### 2. Configure Application Name
The `Application Name` is configured in `/etc/levo/sensor/config.yaml`.

Edit `/etc/levo/sensor/config.yaml`, and set `default-service-name` to the `Application Name` chosen earlier.

```yaml
# --------------------------------------------------------------------------------------------
# Default Application Name:
#
# Auto discovered API endpoints and their OpenAPI specifications are show in the API Catalog
# grouped under this application name. The application name helps segregate and group API
# endpoints from different environments.
# --------------------------------------------------------------------------------------------
#
default-service-name: <'Application Name' chosen earlier>
# --------------------------------------------------------------------------------------------
```

### Configure sensor environment
The eBPF sensor environment is configured in `/etc/default/levo-ebpf-sensor`. The default env value is `staging`

Edit `/etc/default/levo-ebpf-sensor`, and set `LEVO_ENV` to the desired env value (eg. `prod`, `qa`)
Additional sensor configs are present in the file `/etc/levo/sensor/config.yaml`

```bash
# Environment Variables for levo-ebpf-sensor.service
MALLOC_CONF="background_thread:true,narenas:1,tcache:false,dirty_decay_ms:0,muzzy_decay_ms:0,abort_conf:true"
LEVO_ENV="staging"
```

**Note**: If you change the `Application Name` later, you have to restart the Sensor, since it's not a hot property.
**A Sensor *restart* is required for the config changes to take effect.**


### 3. Start the Sensor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Install the eBPF Sensor from Levo's RPM repository.

1. Install the package in your repository.
```shell
sudo yum install levo-ebpf-sensor-0.43.6
sudo yum install levo-ebpf-sensor-0.45.4
```

Enter `y` when prompted.
Expand Down
Loading