Skip to content
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
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,4 @@ dmypy.json
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/
4 changes: 3 additions & 1 deletion radicalbit_ai_monitoring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"init-data": "postgres:15.7-alpine",
"minio-mirror": "minio/minio:latest",
"k3s": "rancher/k3s:v1.30.1-k3s1",
"clickhouse": "clickhouse/clickhouse-server:latest",
"otel-collector": "otel/opentelemetry-collector-contrib:latest",
}

ALL_IMAGES = {**RBIT_IMAGES, **EXTERNAL_IMAGES}
Expand All @@ -29,6 +31,6 @@
OSS_REPO = "https://github.com/radicalbit/radicalbit-ai-monitoring"
OSS_REPO_API = "https://api.github.com/repos/radicalbit/radicalbit-ai-monitoring"

AVAILABLE_VERSIONS = ["latest", "v1.2.0", "v1.1.0", "v1.0.1", "v1.0.0"]
AVAILABLE_VERSIONS = ["latest", "v1.3.0", "v1.2.0", "v1.1.0", "v1.0.1"]

RADICALBIT_FIGLET = "Radicalbit AI Monitoring"
2 changes: 1 addition & 1 deletion radicalbit_ai_monitoring/commands/platform/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@click.option(
"--dir",
"-d",
default=f"{Path.home()}/radicalbit-ai-monitoring",
default=f"{Path.home()}/rbit-ai-monitoring",
help="The name of the directory to create",
show_default=True,
)
Expand Down
2 changes: 1 addition & 1 deletion radicalbit_ai_monitoring/commands/platform/stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@click.option(
"--dir",
"-d",
default=f"{Path.home()}/radicalbit-ai-monitoring",
default=f"{Path.home()}/rbit-ai-monitoring",
help="Path of the installation",
show_default=True,
)
Expand Down
2 changes: 1 addition & 1 deletion radicalbit_ai_monitoring/commands/platform/uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@click.option(
"--dir",
"-d",
default=f"{Path.home()}/radicalbit-ai-monitoring",
default=f"{Path.home()}/rbit-ai-monitoring",
help="Path of the installation",
show_default=True,
)
Expand Down
2 changes: 1 addition & 1 deletion radicalbit_ai_monitoring/commands/platform/up.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@click.option(
"--dir",
"-d",
default=f"{Path.home()}/radicalbit-ai-monitoring",
default=f"{Path.home()}/rbit-ai-monitoring",
help="Path of the installation",
show_default=True,
)
Expand Down
42 changes: 42 additions & 0 deletions radicalbit_ai_monitoring/resources/docker-compose-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ services:
DB_USER: "postgres"
DB_PWD: "postgres"
DB_NAME: "radicalbit"
CLICKHOUSE_DB_HOST: "clickhouse"
CLICKHOUSE_DB_PORT: 9000
CLICKHOUSE_DB_USER: "default"
CLICKHOUSE_DB_PWD: "default"
CLICKHOUSE_DB_NAME: "default"
CLICKHOUSE_DB_SCHEMA: "default"
AWS_ACCESS_KEY_ID: "minio"
AWS_SECRET_ACCESS_KEY: "minio123"
AWS_REGION: "us-east-1"
Expand All @@ -28,6 +34,8 @@ services:
depends_on:
postgres:
condition: service_healthy
clickhouse:
condition: service_healthy
migrations:
condition: service_completed_successfully
createbuckets:
Expand Down Expand Up @@ -165,10 +173,44 @@ services:
start_period: 5s
retries: 2

clickhouse:
image: clickhouse/clickhouse-server:latest
container_name: clickhouse
ports:
- "8123:8123" # HTTP interface
- "9002:9000" # Native client
healthcheck:
test: [ "CMD", "clickhouse-client", "--host", "localhost" ]
interval: 5s
retries: 5
start_period: 5s
timeout: 5s
environment:
- CLICKHOUSE_USER=default
- CLICKHOUSE_PASSWORD=default
volumes:
- rbit-clickhouse_data:/var/lib/clickhouse

otel-collector:
image: otel/opentelemetry-collector-contrib:latest
container_name: otel-collector
restart: always
command: [ "--config", "/etc/otel-collector-config.yaml" ]
volumes:
- ./docker/otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro
ports:
- "4317:4317"
- "4318:4318"
depends_on:
clickhouse:
condition: service_healthy

volumes:
rbit-k3s-server: {}
rbit-data: {}
rbit-minio_storage: {}
rbit-clickhouse_data: {}

networks:
default:
ipam:
Expand Down
44 changes: 15 additions & 29 deletions radicalbit_ai_monitoring/resources/docker/init-data/init_db.sql

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
/usr/bin/mc mb myminio/test-bucket

# Copy files from the project root to the correct paths in the MinIO bucket
/usr/bin/mc cp /data/binary_classification/reference-income.csv myminio/test-bucket/e02f2aed-cd29-4703-8faf-2dcab9fc668e/reference/db15546e-16a3-4482-8317-323d66dbe409/
/usr/bin/mc cp /data/binary_classification/current1-income.csv myminio/test-bucket/e02f2aed-cd29-4703-8faf-2dcab9fc668e/current/b73334fb-aac0-400c-9103-fe894e13bd95/
/usr/bin/mc cp /data/multiclass-classification/3_classes_reference.csv myminio/test-bucket/756204a0-a6ba-44c2-b287-ca828e2b2441/reference/d8cb36a9-2f8b-4e45-bab0-aeaa259a9f46/
/usr/bin/mc cp /data/multiclass-classification/3_classes_current1.csv myminio/test-bucket/756204a0-a6ba-44c2-b287-ca828e2b2441/current/dda74c14-91de-4ae8-a432-3a2f8ccdd153/
/usr/bin/mc cp /data/regression/regression_abalone_reference.csv myminio/test-bucket/6c48c7e1-442b-4c48-a218-95d07f40a805/reference/6ae1390e-656a-45aa-acd4-6f6b38e6acf4/
/usr/bin/mc cp /data/regression/regression_abalone_current1.csv myminio/test-bucket/6c48c7e1-442b-4c48-a218-95d07f40a805/current/edb6ed6c-6e2d-44fa-8a60-40540aec9c03/
/usr/bin/mc cp /data/binary_classification/reference-income.csv myminio/test-bucket/48c3d064-b86b-437c-83ac-9b54bd5fdf9e/reference/dc929555-7be2-4188-b995-993177c83e8b/
/usr/bin/mc cp /data/binary_classification/current1-income.csv myminio/test-bucket/48c3d064-b86b-437c-83ac-9b54bd5fdf9e/current/35d5c8af-332b-4e88-b302-e20e97c53f34/
/usr/bin/mc cp /data/multiclass-classification/3_classes_reference.csv myminio/test-bucket/b1773457-b858-4b99-ae98-9639c999681a/reference/0fa1749a-e0b1-490c-91db-294db6b62ebe/
/usr/bin/mc cp /data/multiclass-classification/3_classes_current1.csv myminio/test-bucket/b1773457-b858-4b99-ae98-9639c999681a/current/b404a54e-f159-499f-a0c2-edf09c562e3a/
/usr/bin/mc cp /data/regression/regression_abalone_reference.csv myminio/test-bucket/3b9fbe63-6ae4-4907-8fc9-786e8a885992/reference/396d3a6f-fa7a-4c8c-8b0e-25da5c56b743/
/usr/bin/mc cp /data/regression/regression_abalone_current1.csv myminio/test-bucket/3b9fbe63-6ae4-4907-8fc9-786e8a885992/current/0e61138f-ca9a-4502-aa90-4aea64c1a91f/

# Exit the script
exit 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
receivers:
filelog:
include:
- /opt/data/logs/access-structured.log
start_at: beginning
operators:
- type: json_parser
timestamp:
parse_from: attributes.time_local
layout: '%Y-%m-%d %H:%M:%S'
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
batch:
timeout: 5s
send_batch_size: 5000
exporters:
clickhouse:
endpoint: tcp://clickhouse:9000?dial_timeout=10s&compress=lz4&async_insert=1&username=default&password=default
# ttl: 72h
traces_table_name: otel_traces
logs_table_name: otel_logs
create_schema: true
timeout: 5s
database: default
sending_queue:
queue_size: 1000
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s


service:
pipelines:
logs:
receivers: [filelog]
processors: [batch]
exporters: [clickhouse]
traces:
receivers: [otlp]
processors: [batch]
exporters: [clickhouse]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [clickhouse]