cleaned bottom references
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Bottom OpenTelemetry Metrics Reference
|
||||
# Symon OpenTelemetry Metrics Reference
|
||||
|
||||
This document lists all metrics exported by Bottom when running with the `opentelemetry` feature enabled.
|
||||
This document lists all metrics exported by Symon when running with the `opentelemetry` feature enabled.
|
||||
|
||||
## System Metrics
|
||||
|
||||
@@ -106,7 +106,7 @@ sum(system_process_memory_usage_bytes{name=~".*chrome.*"})
|
||||
|
||||
## Recording Rules
|
||||
|
||||
The following recording rules are pre-configured in Prometheus (see `rules/bottom_rules.yml`):
|
||||
The following recording rules are pre-configured in Prometheus (see `rules/Symon_rules.yml`):
|
||||
|
||||
| Rule Name | Expression | Description |
|
||||
|-----------|------------|-------------|
|
||||
@@ -166,7 +166,7 @@ system_network_rx_bytes_rate > 10485760
|
||||
|
||||
```yaml
|
||||
groups:
|
||||
- name: bottom_alerts
|
||||
- name: Symon_alerts
|
||||
interval: 30s
|
||||
rules:
|
||||
- alert: HighCPUUsage
|
||||
@@ -208,8 +208,8 @@ groups:
|
||||
| `sensor` | Temperature | Temperature sensor name |
|
||||
| `name` | Process metrics | Process name |
|
||||
| `pid` | Process metrics | Process ID |
|
||||
| `exported_job` | All | Always "bottom-system-monitor" |
|
||||
| `otel_scope_name` | All | Always "bottom-system-monitor" |
|
||||
| `exported_job` | All | Always "Symon-system-monitor" |
|
||||
| `otel_scope_name` | All | Always "Symon-system-monitor" |
|
||||
|
||||
## Data Retention
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
# Bottom OpenTelemetry Docker Compose Setup
|
||||
# Symon OpenTelemetry Docker Compose Setup
|
||||
|
||||
This directory contains a Docker Compose setup for running an observability stack to monitor Bottom with OpenTelemetry.
|
||||
This directory contains a Docker Compose setup for running an observability stack to monitor Symon with OpenTelemetry.
|
||||
|
||||
## Architecture
|
||||
|
||||
The stack includes:
|
||||
|
||||
1. **OpenTelemetry Collector** - Receives metrics from Bottom via OTLP protocol
|
||||
1. **OpenTelemetry Collector** - Receives metrics from Symon via OTLP protocol
|
||||
2. **Prometheus** - Scrapes and stores metrics from the OTEL Collector
|
||||
3. **Grafana** - Visualizes metrics from Prometheus
|
||||
|
||||
```
|
||||
Bottom (with --headless flag)
|
||||
Symon (with --headless flag)
|
||||
↓ (OTLP/gRPC on port 4317)
|
||||
OpenTelemetry Collector
|
||||
↓ (Prometheus scrape on port 8889)
|
||||
@@ -34,7 +34,7 @@ This will start:
|
||||
- Prometheus on port 9090
|
||||
- Grafana on port 3000
|
||||
|
||||
### 2. Build Bottom with OpenTelemetry support
|
||||
### 2. Build Symon with OpenTelemetry support
|
||||
|
||||
```bash
|
||||
cd ..
|
||||
@@ -43,13 +43,13 @@ cargo build --release --features opentelemetry
|
||||
|
||||
### 3. Create a configuration file
|
||||
|
||||
Create a `bottom-config.toml` file:
|
||||
Create a `Symon-config.toml` file:
|
||||
|
||||
```toml
|
||||
[opentelemetry]
|
||||
enabled = true
|
||||
endpoint = "http://localhost:4317"
|
||||
service_name = "bottom-system-monitor"
|
||||
service_name = "Symon-system-monitor"
|
||||
export_interval_ms = 5000
|
||||
|
||||
[opentelemetry.metrics]
|
||||
@@ -62,10 +62,10 @@ temperature = true
|
||||
gpu = true
|
||||
```
|
||||
|
||||
### 4. Run Bottom in headless mode
|
||||
### 4. Run Symon in headless mode
|
||||
|
||||
```bash
|
||||
./target/release/btm --config bottom-config.toml --headless
|
||||
./target/release/btm --config Symon-config.toml --headless
|
||||
```
|
||||
|
||||
Or without config file:
|
||||
@@ -93,11 +93,11 @@ Configures the OpenTelemetry Collector to:
|
||||
|
||||
Configures Prometheus to:
|
||||
- Scrape metrics from the OTEL Collector every 10 seconds
|
||||
- Load alerting rules from `rules/bottom_rules.yml`
|
||||
- Load alerting rules from `rules/Symon_rules.yml`
|
||||
|
||||
### rules/bottom_rules.yml
|
||||
### rules/Symon_rules.yml
|
||||
|
||||
Contains Prometheus recording rules for Bottom metrics, including:
|
||||
Contains Prometheus recording rules for Symon metrics, including:
|
||||
- Recent process CPU usage metrics
|
||||
- Recent process memory usage metrics
|
||||
|
||||
@@ -132,11 +132,11 @@ topk(10, system_process_memory_usage_bytes)
|
||||
|
||||
Grafana is automatically configured with:
|
||||
- **Prometheus data source** (http://prometheus:9090) - pre-configured
|
||||
- **Bottom System Overview dashboard** - pre-loaded
|
||||
- **Symon System Overview dashboard** - pre-loaded
|
||||
|
||||
To access:
|
||||
1. Go to http://localhost:3000 (username: `admin`, password: `admin`)
|
||||
2. Navigate to Dashboards → Browse → "Bottom System Overview"
|
||||
2. Navigate to Dashboards → Browse → "Symon System Overview"
|
||||
|
||||
The dashboard includes:
|
||||
- CPU usage by core
|
||||
@@ -160,7 +160,7 @@ docker-compose down -v
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Bottom not sending metrics
|
||||
### Symon not sending metrics
|
||||
|
||||
Check the OTEL Collector logs:
|
||||
```bash
|
||||
@@ -178,7 +178,7 @@ You should see messages about receiving metrics.
|
||||
|
||||
1. Verify Prometheus data source is configured correctly
|
||||
2. Check that Prometheus has data by querying directly
|
||||
3. Ensure your time range in Grafana includes when Bottom was running
|
||||
3. Ensure your time range in Grafana includes when Symon was running
|
||||
|
||||
## Advanced Configuration
|
||||
|
||||
@@ -188,7 +188,7 @@ A TimescaleDB configuration file is available as `docker-compose-timescale.yml.k
|
||||
|
||||
### Custom Prometheus Rules
|
||||
|
||||
Edit `rules/bottom_rules.yml` to add custom recording or alerting rules.
|
||||
Edit `rules/Symon_rules.yml` to add custom recording or alerting rules.
|
||||
|
||||
### OTEL Collector Sampling
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
services:
|
||||
timescaledb:
|
||||
image: timescale/timescaledb-ha:pg15
|
||||
environment:
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: promscale
|
||||
POSTGRES_USER: postgres
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- timescale_data:/var/lib/postgresql/data
|
||||
|
||||
promscale:
|
||||
image: timescale/promscale:latest
|
||||
ports:
|
||||
- "9201:9201"
|
||||
depends_on:
|
||||
- timescaledb
|
||||
environment:
|
||||
PROMSCALE_DB_URI: postgres://postgres:password@timescaledb:5432/promscale?sslmode=disable
|
||||
PROMSCALE_STARTUP_INSTALL_EXTENSIONS: "true"
|
||||
restart: on-failure
|
||||
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:latest
|
||||
container_name: otel-collector
|
||||
command: ["--config=/etc/otel-collector-config.yml"]
|
||||
volumes:
|
||||
- ./otel-collector-config.yml:/etc/otel-collector-config.yml
|
||||
|
||||
ports:
|
||||
- "4317:4317"
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- ./rules:/etc/prometheus/rules
|
||||
ports:
|
||||
- "9090:9090" # Interfaccia Web di Prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
depends_on:
|
||||
- otel-collector
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
- GF_SECURITY_ADMIN_USER=admin
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
depends_on:
|
||||
- prometheus
|
||||
|
||||
volumes:
|
||||
grafana-storage:
|
||||
timescale_data:
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"title": "Bottom System Overview",
|
||||
"uid": "bottom-overview",
|
||||
"title": "Symon System Overview",
|
||||
"uid": "syon-overview",
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 16,
|
||||
"refresh": "5s",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: 'Bottom Dashboards'
|
||||
- name: 'Syon Dashboards'
|
||||
orgId: 1
|
||||
folder: ''
|
||||
type: file
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
# Example process filter configuration file
|
||||
# This file can be included from the main bottom config to keep
|
||||
# server-specific process lists separate.
|
||||
#
|
||||
# Usage in bottom-config.toml:
|
||||
# [opentelemetry.metrics.process_filter]
|
||||
# include = "processes.toml"
|
||||
|
||||
# Filter mode: "whitelist" or "blacklist"
|
||||
# - whitelist: Only export metrics for processes in the lists below
|
||||
# - blacklist: Export metrics for all processes EXCEPT those in the lists
|
||||
filter_mode = "blacklist"
|
||||
|
||||
# Process names to monitor (case-insensitive substring match)
|
||||
# Examples for common server processes:
|
||||
names = [
|
||||
# Web servers
|
||||
"nginx",
|
||||
"apache",
|
||||
"httpd",
|
||||
|
||||
# Databases
|
||||
"postgres",
|
||||
"mysql",
|
||||
"redis",
|
||||
"mongodb",
|
||||
|
||||
# Application servers
|
||||
"java",
|
||||
"node",
|
||||
"python",
|
||||
|
||||
# Your custom applications
|
||||
# "myapp",
|
||||
]
|
||||
|
||||
# Regex patterns to match process names (case-sensitive)
|
||||
# More powerful than simple substring matching
|
||||
patterns = [
|
||||
# Match specific versions
|
||||
# "^nginx-[0-9.]+$",
|
||||
# "^node-v[0-9]+",
|
||||
|
||||
# Match Java applications with specific main class
|
||||
# "java.*MyApplication",
|
||||
|
||||
# Match processes with specific format
|
||||
# "^gunicorn: worker",
|
||||
|
||||
# Match kernel threads (for blacklist)
|
||||
# "^\\[.*\\]$",
|
||||
]
|
||||
|
||||
# Specific process PIDs to monitor (optional)
|
||||
# Useful for monitoring specific long-running processes
|
||||
pids = []
|
||||
|
||||
# Example blacklist configuration:
|
||||
# filter_mode = "blacklist"
|
||||
# names = [
|
||||
# "systemd", # Exclude system processes
|
||||
# "kworker",
|
||||
# "migration",
|
||||
# ]
|
||||
# patterns = [
|
||||
# "^\\[.*\\]$", # Exclude all kernel threads
|
||||
# ]
|
||||
@@ -1,5 +1,5 @@
|
||||
groups:
|
||||
- name: bottom_process_metrics
|
||||
- name: symon_process_metrics
|
||||
interval: 30s
|
||||
rules:
|
||||
- record: system_process_cpu_usage_percent:recent
|
||||
@@ -1,61 +0,0 @@
|
||||
# Example Symon configuration file for OpenTelemetry export
|
||||
# Copy this file and customize it for your needs
|
||||
|
||||
# Collection interval in seconds
|
||||
collection_interval_secs = 5
|
||||
|
||||
# OTLP configuration
|
||||
[otlp]
|
||||
# OTLP endpoint (gRPC)
|
||||
# For local docker-compose setup: http://localhost:4317
|
||||
# For remote collector: http://your-collector-host:4317
|
||||
endpoint = "http://localhost:4317"
|
||||
|
||||
# Export interval in seconds
|
||||
export_interval_secs = 10
|
||||
|
||||
# Service name that will appear in metrics
|
||||
service_name = "symon"
|
||||
|
||||
# Service version
|
||||
service_version = "0.1.0"
|
||||
|
||||
# Export timeout in seconds
|
||||
export_timeout_secs = 30
|
||||
|
||||
# Additional resource attributes (key-value pairs)
|
||||
[otlp.resource_attributes]
|
||||
environment = "production"
|
||||
host = "server-01"
|
||||
|
||||
# Metrics configuration - enable/disable specific metric types
|
||||
[metrics]
|
||||
cpu = true # CPU usage per core and average
|
||||
memory = true # RAM, swap usage
|
||||
network = true # Network RX/TX
|
||||
disk = true # Disk usage
|
||||
temperature = true # CPU/GPU temperatures
|
||||
processes = true # Top 10 processes by CPU/Memory
|
||||
|
||||
# Process filtering configuration
|
||||
[metrics.process_filter]
|
||||
# Option 1: Use an external file for server-specific process lists
|
||||
# This allows different servers to monitor different processes
|
||||
# Path can be relative to this config file or absolute
|
||||
#include = "processes.toml"
|
||||
|
||||
# Option 2: Configure inline
|
||||
# Filter mode: "whitelist" (only listed processes) or "blacklist" (exclude listed)
|
||||
filter_mode = "whitelist"
|
||||
|
||||
# List of process names to filter (case-insensitive substring match)
|
||||
# Examples: ["nginx", "postgres", "redis", "myapp"]
|
||||
names = ["nginx", "postgres", "redis"]
|
||||
|
||||
# List of regex patterns to match process names (case-sensitive)
|
||||
# More powerful than substring matching
|
||||
# Examples: ["^nginx-[0-9.]+$", "java.*MyApp", "^gunicorn: worker"]
|
||||
patterns = []
|
||||
|
||||
# List of specific process PIDs to filter
|
||||
pids = []
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
echo "🔍 Testing Bottom OpenTelemetry Stack..."
|
||||
echo "🔍 Testing Symon OpenTelemetry Stack..."
|
||||
echo ""
|
||||
|
||||
# Colors
|
||||
@@ -75,6 +75,6 @@ echo " - Grafana: http://localhost:3000 (admin/admin)"
|
||||
echo " - OTEL Collector metrics: http://localhost:8889/metrics"
|
||||
echo ""
|
||||
echo "💡 Next steps:"
|
||||
echo " 1. Build bottom with: cargo build --release --features opentelemetry"
|
||||
echo " 1. Build Symon with: cargo build --release --features opentelemetry"
|
||||
echo " 2. Run in headless mode: ./target/release/btm --headless"
|
||||
echo " 3. Check metrics in Prometheus: http://localhost:9090/graph"
|
||||
|
||||
Reference in New Issue
Block a user