This dashboard provides a sleek, real-time interface for monitoring Suricata IDS alerts. It displays statistics, high/medium/low priority alerts, and allows advanced search and filtering.
- Real-time updates of Suricata alerts.
- High, medium, and low priority alert visualization.
- Advanced search by signature, IP, port, or category.
- Auto-refresh with adjustable interval.
- Performance metrics including log size, processing time, and alerts per second.
- Python 3.x
- Suricata IDS installed and logging alerts to eve.json
- Web browser for accessing the dashboard
- Clone this repository:
git clone https://github.com/appaKappaK/suricata-dashboard.git
cd suricata-dashboard- Create a
.envfile with placeholders for configuration:
SURICATA_LOG_FILE=/path/to/suricata/eve.json
DASHBOARD_MAX_LINES=5000
DASHBOARD_REFRESH_INTERVAL=10
DASHBOARD_HOST=127.0.0.1
DASHBOARD_PORT=8080
HIGH_PRIORITY_THRESHOLD=10- Install dependencies:
pip install -r requirements.txt- Run the dashboard:
python suricata_dashboard.py- Access the dashboard in your browser:
http://<DASHBOARD_HOST>:<DASHBOARD_PORT>
SURICATA_LOG_FILE: Path to Suricata's eve.json log.DASHBOARD_MAX_LINES: Maximum number of lines to read from the log for performance.DASHBOARD_REFRESH_INTERVAL: Refresh interval in seconds.DASHBOARD_HOST: Host/IP to bind the dashboard.DASHBOARD_PORT: Port to serve the dashboard.HIGH_PRIORITY_THRESHOLD: Number of alerts considered high priority.
By default, suricata_dashboard.py is set up to run directly with Python:
python suricata_dashboard.pyTo use Gunicorn, you need to comment the uncommented and uncomment the commented...
Either way the bottom needs to have this uncommented and the other recommented or removed for it to work... SOME ASSEMBLY REQUIRED
def create_app():
# Validate configuration first
validate_config()
# Start background log monitoring
monitor_thread = threading.Thread(target=log_monitor, daemon=True)
monitor_thread.start()
app_logger.info("🚀 Suricata IDS Dashboard v2.0 Starting...")
app_logger.info(f"📁 Log file: {LOG_FILE}")
app_logger.info(f"📊 Max lines to read: {MAX_LINES_TO_READ}")
app_logger.info(f"⏱️ Refresh interval: {REFRESH_INTERVAL}s")
app_logger.info(f"🔔 High priority threshold: {HIGH_PRIORITY_THRESHOLD} alerts")
app_logger.info(f"🌐 Dashboard URL: http://{HOST}:{PORT}")
app_logger.info(f"📝 App logs: logs/suricata_dashboard.log (50MB rotation)")
# Initial log parse
parse_suricata_log()
return app
# For gunicorn to see:
app = create_app()
if __name__ == '__main__':
app.run(host=HOST, port=PORT, debug=False)Then you can run Gunicorn like this:
gunicorn -w 4 -b 0.0.0.0:8080 suricata_dashboard:app-w 4starts 4 worker processes (adjust as needed).-b 0.0.0.0:8080binds the app to all interfaces on port 8080.suricata_dashboard:apppoints Gunicorn to the Flaskappobject returned bycreate_app().
This project uses the GPL-3.0 license. See LICENSE for details.