rsyslox

command module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 4 Imported by: 0

README ΒΆ

rsyslox

License Go Version Release

High-performance REST API for rsyslog/MySQL written in Go.

πŸ“– About

A modern REST API server that queries rsyslog data from a MySQL/MariaDB database and makes it accessible via HTTP/JSON. Perfect for monitoring dashboards, log analysis, and system integration.

🌟 Features
  • πŸš€ High Performance - Compiled in Go for maximum speed
  • πŸ” Advanced Filtering - Multi-value filters for complex queries
  • πŸ“Š All Fields - Access to all 25+ SystemEvents columns
  • πŸ” Secure - API key authentication, SSL/TLS support
  • 🐳 Docker Ready - Complete test environment with live data
  • πŸ“ REST API - Clean JSON responses
  • 🎯 RFC-5424 Compliant - Proper syslog severity and facility labels

πŸš€ Quick Start

# Download latest release
wget https://github.com/phil-bot/rsyslox/releases/latest/download/rsyslox-linux-amd64

# Install
chmod +x rsyslox-linux-amd64
sudo mv rsyslox-linux-amd64 /usr/local/bin/rsyslox

# Create configuration
cat > .env << EOF
API_KEY=$(openssl rand -hex 32)
DB_HOST=localhost
DB_NAME=Syslog
DB_USER=rsyslog
DB_PASS=your-password
EOF

# Run
rsyslox

Test the API:

curl http://localhost:8000/health
curl -H "X-API-Key: YOUR_KEY" "http://localhost:8000/logs?limit=5"
Docker Test Environment

Perfect for testing with live generated logs:

# Build binary
make build-static

# Start container
cd docker && docker-compose up -d

# Test
curl "http://localhost:8000/logs?limit=5"

β†’ Full Installation Guide

πŸ“š Documentation

Getting Started
API & Usage
Administration
Development

β†’ Full Documentation

πŸ’‘ Examples

Retrieve logs with filters
# All errors from the last hour
curl -H "X-API-Key: YOUR_KEY" \
  "http://localhost:8000/logs?Priority=3&start_date=2025-02-09T09:00:00Z"

# Logs from multiple hosts (Multi-value!)
curl -H "X-API-Key: YOUR_KEY" \
  "http://localhost:8000/logs?FromHost=web01&FromHost=web02&FromHost=db01"

# Combined filters
curl -H "X-API-Key: YOUR_KEY" \
  "http://localhost:8000/logs?FromHost=web01&Priority=3&Priority=4&limit=20"
Query metadata
# All available hosts
curl -H "X-API-Key: YOUR_KEY" "http://localhost:8000/meta/FromHost"

# All priorities with labels
curl -H "X-API-Key: YOUR_KEY" "http://localhost:8000/meta/Priority"

# Hosts that had errors
curl -H "X-API-Key: YOUR_KEY" \
  "http://localhost:8000/meta/FromHost?Priority=3&Priority=4"

β†’ More Examples

πŸ†• What's New in v0.2.3?

  • βœ… Complete Modularization - Clean code architecture
  • βœ… Structured Error Responses - Better API error handling
  • βœ… DB Connection String Support - Flexible database configuration
  • βœ… Multi-Value Filters - Multiple values per parameter
  • βœ… Extended Columns - All 25+ SystemEvents fields

β†’ Changelog

πŸ—ΊοΈ Roadmap

v0.3.0 (Planned)
  • Negation filters (exclude, not)
  • Advanced filter combinations
  • Complex query support
v0.4.0 (Planned)
  • Statistics endpoint (/stats)
  • Aggregations
  • Timeline/Histogram
  • WebUI integration

β†’ GitHub Issues

🀝 Support & Community

πŸ™ Contributing

Contributions are welcome! Please read the Contributing Guidelines.

  1. Fork the repository
  2. Create feature branch
  3. Make changes & add tests
  4. Submit pull request

πŸ“„ License

MIT License - see LICENSE for details.

✨ Credits

Created with ❀️ for the syslog community.

Built with:


⭐ Star this project if it helps you!

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL