Collect logs, metrics, command outputs and packet captures from every device in a test, and investigate them together in a single test session.
Live demo Β· Quick start Β· Features Β· REST API Β· Contributing
π Click the preview to open the interactive demo.
When a multi-device test fails, the evidence is scattered across machines. LogOctopus is built around test sessions, not generic log aggregation, and answers one question:
What happened during this test?
|
|
14:31:07.120 Client request started
14:31:07.124 Router packet forwarded
14:31:07.131 Server request received
14:31:07.145 Embedded application error β root cause
14:31:10.145 Client timeout
No more correlating timestamps across four terminals.
| π Multi-device collection | Collect from many SSH-accessible devices at once: direct connections, gateway / jump hosts, custom commands, log files. No agent required. |
| π§ͺ Test-session investigation | Every run is a session with scenario name, timestamps, device info, logs, metrics, command outputs and captures. |
| π Unified log explorer | Merged timeline, filtering, highlighting, CSV export, interactive charts with zoom & pan, device comparison. |
| π‘ Packet capture | Collect pcap data and inspect decoded packets next to your logs. Ideal for timeouts, packet loss and protocol issues. |
| π€ Automation friendly | Start/stop collection from CI/CD, Python test suites or any runner via REST API. |
| ποΈ Zero-dependency storage | Local snapshot storage. No external database for the basic setup. |
Works with: Linux Β· Windows Β· Raspberry Pi Β· Cisco Β· MikroTik Β· pfSense Β· Proxmox Β· Synology NAS Β· embedded devices Β· custom test infrastructure
Requirements: Docker, Docker Compose, and SSH access to the devices you want to collect from.
# 1. Clone
git clone https://github.com/kkuuba/LogOctopus.git
cd LogOctopus
# 2. Configure (see docs/example_configs/ for ready-made device configs)
nano .env
# 3. Run
docker compose up -d| Service | URL |
|---|---|
| Frontend | http://localhost:8100 |
| Backend | http://localhost:8050 |
π‘ Not ready to install? Explore the live demo β
βοΈ Device configuration example
Devices are configured in JSON:
{
"device_name": "Raspberry-PI-Zero",
"ip_address": "192.168.12.2",
"port": 22,
"user": "pi_user",
"password": "pi_password",
"collection_interval": 30,
"log_file_configs": [
{
"log_name": "syslog",
"log_file_cmd": "sudo journalctl -n 200 --no-pager",
"data_extraction_regex": "^(?P<TIME>\\w+\\s+\\d+\\s+\\d+\\:\\d+\\:\\d+)\\s+(?P<ENTRY>.*)",
"log_type": "text",
"data_unit": "",
"description": ""
},
{
"log_name": "kernel",
"log_file_cmd": "dmesg -T",
"data_extraction_regex": "^\\[(?P<TIME>\\w+\\s+\\w+\\s+\\d+\\s\\d+\\:\\d+\\:\\d+\\s+\\d+)\\]\\s+(?P<ENTRY>.*)",
"log_type": "text",
"data_unit": "",
"description": ""
},
{
"log_name": "ssh_logs",
"log_file_cmd": "journalctl -u ssh -n 200 --no-pager",
"data_extraction_regex": "^(?P<TIME>\\w+\\s+\\d+\\s+\\d+\\:\\d+\\:\\d+)\\s+(?P<ENTRY>.*)",
"log_type": "text",
"data_unit": "",
"description": ""
},
{
"log_name": "cron_logs",
"log_file_cmd": "journalctl -u cron -n 200 --no-pager",
"data_extraction_regex": "^(?P<TIME>\\w+\\s+\\d+\\s+\\d+\\:\\d+\\:\\d+)\\s+(?P<ENTRY>.*)",
"log_type": "text",
"data_unit": "",
"description": ""
},
{
"log_name": "system_errors",
"log_file_cmd": "journalctl -p err -n 200 --no-pager",
"data_extraction_regex": "^(?P<TIME>\\w+\\s+\\d+\\s+\\d+\\:\\d+\\:\\d+)\\s+(?P<ENTRY>.*)",
"log_type": "text",
"data_unit": "",
"description": ""
},
{
"log_name": "system_warnings",
"log_file_cmd": "journalctl -p warning -n 200 --no-pager",
"data_extraction_regex": "^(?P<TIME>\\w+\\s+\\d+\\s+\\d+\\:\\d+\\:\\d+)\\s+(?P<ENTRY>.*)",
"log_type": "text",
"data_unit": "",
"description": ""
},
{
"log_name": "boot_logs",
"log_file_cmd": "journalctl -b -n 200 --no-pager",
"data_extraction_regex": "^(?P<TIME>\\w+\\s+\\d+\\s+\\d+\\:\\d+\\:\\d+)\\s+(?P<ENTRY>.*)",
"log_type": "text",
"data_unit": "",
"description": ""
},
{
"log_name": "cpu_usage_percent",
"log_file_cmd": "echo $(date '+%Y-%m-%d %H:%M:%S'),$(top -bn1 | grep 'Cpu(s)' | awk '{print 100-$8}')",
"data_extraction_regex": "^(?P<TIME>\\d+\\-\\d+\\-\\d+\\s\\d+\\:\\d+\\:\\d+)\\,(?P<ENTRY>.*)",
"log_type": "chart",
"data_unit": "%",
"description": ""
},
{
"log_name": "free_memory_mb",
"log_file_cmd": "echo $(date '+%Y-%m-%d %H:%M:%S'),$(free -m | awk '/Mem:/ {print $4}')",
"data_extraction_regex": "^(?P<TIME>\\d+\\-\\d+\\-\\d+\\s\\d+\\:\\d+\\:\\d+)\\,(?P<ENTRY>.*)",
"log_type": "chart",
"data_unit": "MB",
"description": ""
},
{
"log_name": "used_memory_mb",
"log_file_cmd": "echo $(date '+%Y-%m-%d %H:%M:%S'),$(free -m | awk '/Mem:/ {print $3}')",
"data_extraction_regex": "^(?P<TIME>\\d+\\-\\d+\\-\\d+\\s\\d+\\:\\d+\\:\\d+)\\,(?P<ENTRY>.*)",
"log_type": "chart",
"data_unit": "MB",
"description": ""
},
{
"log_name": "disk_usage_percent",
"log_file_cmd": "echo $(date '+%Y-%m-%d %H:%M:%S'),$(df / | awk 'NR==2 {print $5}' | tr -d '%')",
"data_extraction_regex": "^(?P<TIME>\\d+\\-\\d+\\-\\d+\\s\\d+\\:\\d+\\:\\d+)\\,(?P<ENTRY>.*)",
"log_type": "chart",
"data_unit": "%",
"description": ""
},
{
"log_name": "cpu_temp_c",
"log_file_cmd": "echo $(date '+%Y-%m-%d %H:%M:%S'),$(vcgencmd measure_temp | grep -o '[0-9.]*')",
"data_extraction_regex": "^(?P<TIME>\\d+\\-\\d+\\-\\d+\\s\\d+\\:\\d+\\:\\d+)\\,(?P<ENTRY>.*)",
"log_type": "chart",
"data_unit": "Β° C",
"description": ""
},
{
"log_name": "load_avg_1min",
"log_file_cmd": "echo $(date '+%Y-%m-%d %H:%M:%S'),$(cat /proc/loadavg | awk '{print $1}')",
"data_extraction_regex": "^(?P<TIME>\\d+\\-\\d+\\-\\d+\\s\\d+\\:\\d+\\:\\d+)\\,(?P<ENTRY>.*)",
"log_type": "chart",
"data_unit": "",
"description": ""
},
{
"log_name": "load_avg_5min",
"log_file_cmd": "echo $(date '+%Y-%m-%d %H:%M:%S'),$(cat /proc/loadavg | awk '{print $2}')",
"data_extraction_regex": "^(?P<TIME>\\d+\\-\\d+\\-\\d+\\s\\d+\\:\\d+\\:\\d+)\\,(?P<ENTRY>.*)",
"log_type": "chart",
"data_unit": "",
"description": ""
},
{
"log_name": "process_count",
"log_file_cmd": "echo $(date '+%Y-%m-%d %H:%M:%S'),$(ps -e | wc -l)",
"data_extraction_regex": "^(?P<TIME>\\d+\\-\\d+\\-\\d+\\s\\d+\\:\\d+\\:\\d+)\\,(?P<ENTRY>.*)",
"log_type": "chart",
"data_unit": "",
"description": ""
},
{
"log_name": "active_devices_count",
"log_file_cmd": "echo $(date '+%Y-%m-%d %H:%M:%S'),$(nmap -sn 192.168.0.0/24 2>/dev/null | grep -c 'Host is up')",
"data_extraction_regex": "^(?P<TIME>\\d+\\-\\d+\\-\\d+\\s\\d+\\:\\d+\\:\\d+)\\,(?P<ENTRY>.*)",
"log_type": "chart",
"data_unit": "",
"description": ""
},
{
"log_name": "network_rx_bytes",
"log_file_cmd": "F=/tmp/rx_prev; RX=$(< /sys/class/net/wlan0/statistics/rx_bytes); NOW=$(date +%s); read T R < $F 2>/dev/null; [ \"$T\" ] && echo \"$(date '+%F %T'),$(( (RX - R) * 30 / (NOW - T) ))\"; echo $NOW $RX > $F",
"data_extraction_regex": "^(?P<TIME>\\d+\\-\\d+\\-\\d+\\s\\d+\\:\\d+\\:\\d+)\\,(?P<ENTRY>.*)",
"log_type": "chart",
"data_unit": "bytes",
"description": ""
},
{
"log_name": "network_tx_bytes",
"log_file_cmd": "F=/tmp/tx_prev; TX=$(< /sys/class/net/wlan0/statistics/tx_bytes); NOW=$(date +%s); read T R < $F 2>/dev/null; [ \"$T\" ] && echo \"$(date '+%F %T'),$(( (TX - R) * 30 / (NOW - T) ))\"; echo \"$NOW $TX\" > $F",
"data_extraction_regex": "^(?P<TIME>\\d+\\-\\d+\\-\\d+\\s\\d+\\:\\d+\\:\\d+)\\,(?P<ENTRY>.*)",
"log_type": "chart",
"data_unit": "bytes",
"description": ""
}
],
"packets_capture_config": {
"capture_start_cmd": "sudo tcpdump",
"capture_stop_cmd": "sudo pkill -INT -f 'tcpdump -i'",
"capture_description": "Network capture for 'wlan0' interface"
}
}More examples (Linux, Windows, Cisco, MikroTik, pfSense, Proxmox, Raspberry Pi, Synology NAS) live in docs/example_configs/.
Integrate collection into automated tests in three steps:
flowchart LR
A[Start collection] --> B[Run automated test]
B --> C[Stop collection]
C --> D[Open test session]
D --> E[Investigate failure]
curl -X POST http://localhost:8050/api/start-logs-collection \
-H "Content-Type: application/json" \
-d '{
"selected_devices": ["server-01"],
"session_scenario": "test"
}'The API lets you start/stop collection, manage devices, query snapshots and retrieve logs. It plugs into CI/CD pipelines, Python test suites, custom runners and automation frameworks.
flowchart TB
UI[React Frontend] -->|REST API| BE[Flask Backend]
BE -->|SSH / commands| A[Device A]
BE -->|SSH / commands| B[Device B]
BE -->|SSH / commands| C[Device C]
BE --> S[(Local snapshot storage)]
Stack: React Β· Flask Β· SSH-based collection layer Β· local snapshot storage
π Project structure
LogOctopus/
βββ backend/ # Flask backend
βββ frontend/ # React frontend
βββ demo/ # Demo environment
βββ docs/ # Documentation and examples
βββ tests/ # Tests
βββ Dockerfile.backend
βββ Dockerfile.frontend
βββ docker-compose.yml
βββ README.md
| LogOctopus | Manual SSH | Generic log platform | |
|---|---|---|---|
| Multi-device collection | β | β | |
| SSH-based collection | β | β | Usually |
| No agent required | β | β | Usually |
| Test-session grouping | β | β | |
| Test-oriented investigation | β | β | |
| Network captures | β | Manual | Depends |
| Quick local setup | β | β | Usually |
| CI/CD integration | β | β |
LogOctopus is not a replacement for general-purpose observability platforms. It solves a different problem: collecting and investigating evidence from distributed test executions.
| Role | How LogOctopus helps |
|---|---|
| π§ Embedded engineers | Application and system logs from embedded Linux devices during automated tests |
| π§ͺ QA / test automation | Evidence for failed integration and system tests, collected automatically |
| π Network engineers | Logs and packet captures from routers, switches, firewalls, servers and clients |
| βοΈ DevOps / CI engineers | Test-session evidence attached to automated workflows |
| π© Hardware validation teams | Logs and system info from every device, kept together per test run |
Great for: distributed integration tests Β· system testing Β· network testing Β· embedded testing Β· hardware validation Β· QA automation Β· manual troubleshooting Β· CI/CD test environments
- Historical test comparison
- Test-to-test diffing
- Trend analysis
- Improved device monitoring
- More test-framework integrations
- AI-assisted configuration generation
- Improved CI/CD integrations
Have an idea? Open an issue and start a discussion.
Contributions are welcome, whether it's a bug fix, support for a new device, or a test-framework integration.
- Open an issue and discuss the change
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Submit a pull request
If LogOctopus saves you time, a star helps other engineers find it.
π Report bugs Β· π‘ Suggest features Β· π§ Contribute code Β· π Improve docs Β· π£οΈ Tell a colleague
LogOctopus is released under the MIT License.
Built for engineers who would rather investigate a failed test than SSH into ten machines to find out what happened.