Skip to main content
ML Defender provides comprehensive monitoring capabilities through logs, metrics, IPSet statistics, and real-time dashboards. This guide covers log locations, monitoring commands, and observability tools.

Log Locations

Vagrant/Development

All logs are centralized in /vagrant/logs/lab/:

Docker Compose

Debian Package

Monitoring Dashboard

Use the built-in monitoring script for real-time visibility.

Live Monitoring Script

The monitor_lab.sh script provides a comprehensive real-time dashboard:
Dashboard Output:

Dashboard Features

The monitoring script shows:
  • System Stats: CPU, RAM, Disk usage
  • Component Status: Process health, PID, resource usage, uptime
  • Configuration: Active config files for each component
  • Network Ports: ZMQ socket status and connection counts
  • IPSet Statistics: Blacklist entries and memory usage
  • Recent Activity: Last 5 log lines per component
  • Recent Blocks: Last 5 blocked IPs
  • Log Commands: Quick commands to tail individual logs

Component Metrics

Sniffer Metrics

Output:

ML Detector Metrics

Output:

Firewall ACL Agent Metrics

Output:

IPSet Monitoring

View IPSet Contents

Monitor IPSet Changes

IPSet Statistics

ZeroMQ Traffic Monitoring

Port Status

Message Flow

ZMQ Performance

Real Monitoring Scripts

ML Defender includes production-ready monitoring scripts:

monitor_lab.sh

Comprehensive dashboard (covered above):
source/scripts/monitor_lab.sh

monitor_stability.sh

Long-term stability monitoring:

monitor_stress.sh

Stress test monitoring:

Log Analysis

Search for Errors

Analyze Detection Patterns

Analyze Blocked IPs

Performance Analysis

Dashboard and Alerting (Roadmap)

These features are planned for future releases.

Prometheus Integration (Planned)

Grafana Dashboards (Planned)

  • Real-time component health
  • Detection rate trends
  • IPSet capacity utilization
  • ZMQ message flow
  • CPU/Memory usage graphs
  • Threat heatmaps

Alerting Rules (Planned)

Quick Reference

Monitoring Commands

Vagrant Aliases

Next Steps

Performance Tuning

Optimize component performance

Troubleshooting

Diagnose and fix issues

Configuration

Configure monitoring settings

Architecture

Understand component interactions