Skip to content
Draft
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
46 changes: 26 additions & 20 deletions Examples/run-with-docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,32 @@ services:
networks:
- cortexflow

#cortexflow-identity:
# image: lorenzotettamanti/cortexflow-identity:0.1.2
# container_name: cortexflow-identity
# stop_signal: SIGINT
# restart: unless-stopped
# privileged: true
# pid: host
# init: true
# command: ["/usr/local/bin/cortexflow-identity-service"]
# volumes:
# - type: bind
# source: /sys/fs/bpf
# target: /sys/fs/bpf
# bind:
# propagation: shared
# - /lib/modules:/lib/modules:ro
# - /sys/kernel/debug:/sys/kernel/debug
# - /proc:/host/proc:ro
# networks:
# - cortexflow
cortexflow-identity:
image: lorenzotettamanti/cortexflow-identity:0.1.2
container_name: cortexflow-identity
stop_signal: SIGINT
restart: unless-stopped
privileged: true
pid: host
init: true
command: ["/usr/local/bin/cortexflow-identity-service"]
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
- OTEL_EXPORTER_OTLP_PROTOCOL=grpc
- OTEL_SERVICE_NAME=cortexflow-identity
- OTEL_RESOURCE_ATTRIBUTES=service.namespace=cortexflow,service.version=0.1.5
- DEFAULT_MAP_READING_TIME=100
volumes:
- type: bind
source: /sys/fs/bpf
target: /sys/fs/bpf
bind:
propagation: shared
- /lib/modules:/lib/modules:ro
- /sys/kernel/debug:/sys/kernel/debug
- /proc:/host/proc:ro
networks:
- cortexflow

otel-collector:
image: otel/opentelemetry-collector-contrib:0.162.0
Expand Down
2 changes: 0 additions & 2 deletions cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 3 additions & 28 deletions core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tonic = "0.14.0"
tonic-prost = "0.14.0"
tracing = "0.1.41"
aya = "0.13.1"
cortexbrain-common = { version="0.1.4", features = [
cortexbrain-common = { path="../common", features = [
"map-handlers",
"network-structs",
"buffer-reader",
Expand Down
2 changes: 1 addition & 1 deletion core/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ opentelemetry = "0.32.0"
opentelemetry_sdk = { version = "0.32.0", features = ["logs", "rt-tokio"] }
opentelemetry-stdout = { version = "0.32.0", features = ["logs"] }
opentelemetry-appender-tracing = "0.32.0"
opentelemetry-otlp = { version = "0.32.0", features = ["logs", "grpc-tonic"] }
opentelemetry-otlp = { version = "0.32.0", features = ["logs", "metrics", "grpc-tonic"] }
bytemuck = "1.25.0"
bytes = "1.12.1"
bytemuck_derive = "1.10.2"
Expand Down
1 change: 1 addition & 0 deletions core/common/src/buffer_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pub struct TcpPacketRegistry {
pub dst_port: u16,
pub pid: u32,
pub command: [u8; 16],
pub direction: u8,
pub cgroup_id: u64,
}
#[cfg(feature = "network-structs")]
Expand Down
9 changes: 8 additions & 1 deletion core/common/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,11 @@ pub const PIN_MAP_PATH: &str = "PIN_MAP_PATH";
/// by searching the default system library directories.
pub const LIBSSL_PATH: &str = "LIBSSL_PATH";

pub const DEFAULT_MAP_READING_TIME : &str = "DEFAULT_MAP_READING_TIME";
pub const DEFAULT_MAP_READING_TIME: &str = "DEFAULT_MAP_READING_TIME";

/// Direction of a connection observed by the identity service.
pub const CONNECTION_DIRECTION_INGRESS: u8 = 0;
pub const CONNECTION_DIRECTION_EGRESS: u8 = 1;

/// Idle time after which a previously observed identity flow is considered new again.
pub const IDENTITY_FLOW_TTL_SECS: u64 = 300;
Loading
Loading