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

Add cpu limit to pcap sensor #171

Merged
merged 2 commits into from
Dec 18, 2023
Merged
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,27 +34,28 @@ The steps to add the sensor to your task are as follows
- Add the given JSON object under ContainerDefinitions
- Replace the values for satellite-url, levo-env and levoai-org-id in entrypoint.
- Replace the values for Environment and LogConfiguration as per your requirement.
- Set the cpu limit as number of CPU Units (*Note: 1 core = 1024 CPU Units*)
- Set the memory limit in `Mib` (*Note: memory should not exceed the Task memory limit*)

```json
{
"name": "levo-pcap-sensor",
"image": "levoai/pcap-sensor",
"cpu": 0,
"memory": 256,
"cpu": 512,
"memory": 512,
"portMappings": [],
"essential": false,
"entryPoint": [
"./run.sh",
"./levo_pcap_sensor.sh",
"apidump",
"--satellite-url",
"< INSERT SATELLITE URL (http(s)://hostname|IP:port) >",
"--levo-env",
"<INSERT APPLICATION ENVIRONMENT (staging, production etc.)>",
"--levoai-org-id",
"< INSERT LEVO ORG ID >",
"--sample-rate",
"<INSERT DECIMAL NUMBER FROM 0 TO 1"
"--rate-limit",
"<INSERT NUMBER OF TRACES PER MINUTE>"
],
"environment": [
{
Expand All @@ -79,7 +80,7 @@ The steps to add the sensor to your task are as follows
Specify additional flags in the entrypoint
```bash
--trace-export-interval # default 10s
--sample-rate # default 1
--rate-limit # number of traces per minute
--filter # eg. port 8080 and (not port 8081)
--host-allow # regex for allowed hosts
--path-allow # regex for allowed paths
Expand All @@ -95,15 +96,15 @@ Specify additional flags in the entrypoint

```bash
sudo docker run --net=host --rm -it levoai/pcap-sensor \
./run.sh apidump \
./levo_pcap_sensor.sh apidump \
--satellite-url "your satellite url (http(s)://hostname|IP:port)" \
--levo-env "your application environment (staging, production etc.)" \
--levoai-org-id "your levo org id"
```
Specify additional flags in the command
```bash
--trace-export-interval "trace export interval in seconds (default 10)"
--sample-rate "sampling rate for traces (default 1)"
--rate-limit "number of traces per minute"
--filter "pcap filter string, eg. port 8080 and (not port 8081)"
--host-allow "host allow regex"
--path-allow "path allow regex"
Expand Down
Loading