Skip to content

About

LogOctopus collects, stores, and visualises logs for manual and automated tests

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

LogOctopus logo

LogOctopus

One test. Multiple devices. One place to debug.

Collect logs, metrics, command outputs and packet captures from every device in a test, and investigate them together in a single test session.


Try the live demo



CI License: MIT Stars Docker Agentless

Live demo Β· Quick start Β· Features Β· REST API Β· Contributing


LogOctopus live demo preview

πŸ‘† Click the preview to open the interactive demo.


🎯 Why LogOctopus?

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?

❌ Without LogOctopus

Test failed
   ↓
SSH into device A β†’ find logs
   ↓
SSH into device B β†’ find logs
   ↓
Check system state
   ↓
Compare timestamps by hand
   ↓
Open Wireshark
   ↓
Reconstruct what happened

βœ… With LogOctopus

Test failed
   ↓
Open the test session
   ↓
All evidence, one timeline:
  β€’ application logs
  β€’ system logs & metrics
  β€’ command output
  β€’ packet capture
   ↓
Investigate the failure

See the failure in one timeline

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.


✨ Features

πŸ”Œ 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


πŸš€ Quick start

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/.


πŸ€– REST API

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]
Loading
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.


πŸ—οΈ Architecture

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)]
Loading

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

πŸ†š How it compares

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.


πŸ‘₯ Who is it for?

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


πŸ—ΊοΈ Roadmap

  • 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.


🀝 Contributing

Contributions are welcome, whether it's a bug fix, support for a new device, or a test-framework integration.

  1. Open an issue and discuss the change
  2. Fork the repository
  3. Create a feature branch: git checkout -b feature/my-feature
  4. Submit a pull request

⭐ Support the project

If LogOctopus saves you time, a star helps other engineers find it.

Star on GitHub

πŸ› 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.

πŸš€ Try the live demo

About

LogOctopus collects, stores, and visualises logs for manual and automated tests

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages