Skip to content

[Feature] Add FreeBSD support for process monitoring in procmond component #104

@unclesp1d3r

Description

@unclesp1d3r

Problem Statement

Home labs and small businesses often use pfSense and OPNsense routers/firewalls, which are based on FreeBSD. Currently, DaemonEye has no planned support for FreeBSD-based systems, limiting its usefulness for monitoring these critical network infrastructure components.

Proposed Solution

Implement basic FreeBSD support in the procmond component by leveraging existing capabilities:

Technical Approach

  1. Leverage sysinfo crate: The sysinfo crate already provides cross-platform system information gathering with FreeBSD support
  2. Extend platform detection: Add FreeBSD target detection using cfg(target_os = "freebsd") conditionals
  3. Process monitoring foundation: Build upon existing process monitoring patterns used for Linux/Windows

Implementation Plan

Phase 1: Basic Process Monitoring

  • Add FreeBSD target configuration in procmond Cargo.toml
  • Implement FreeBSD-specific process enumeration using sysinfo
  • Add basic process metrics collection (CPU, memory, PID)
  • Test on FreeBSD 13.x/14.x systems

Phase 2: Enhanced Capabilities

  • Explore FreeBSD-specific crates for advanced monitoring:
    • freebsd crate for system calls
    • kvm bindings for kernel virtual memory access
  • Add network interface monitoring
  • Implement system resource monitoring

Phase 3: pfSense/OPNsense Optimization

  • Test specifically on pfSense and OPNsense systems
  • Add firewall-specific monitoring capabilities
  • Document deployment procedures for FreeBSD-based routers

Use Cases

  • Router Monitoring: Monitor pfSense/OPNsense router performance and processes
  • Firewall Health: Track critical firewall services and resource usage
  • Network Infrastructure: Comprehensive monitoring of FreeBSD-based network appliances
  • Home Lab Environments: Support for popular open-source router/firewall platforms

Technical Considerations

  • Dependency Compatibility: Verify all current dependencies support FreeBSD
  • Testing Environment: Need access to FreeBSD test systems
  • Documentation: Update installation and configuration docs for FreeBSD

Alternative Solutions

  1. Container-based approach: Run DaemonEye in a FreeBSD jail
  2. Remote monitoring: Use existing Linux/Windows agents with remote FreeBSD monitoring
  3. Third-party integration: Integrate with existing FreeBSD monitoring tools

Acceptance Criteria

  • procmond component compiles and runs on FreeBSD 13.x+
  • Basic process monitoring functionality works on FreeBSD
  • Successfully tested on pfSense and/or OPNsense systems
  • Documentation updated with FreeBSD deployment instructions
  • CI pipeline includes FreeBSD compatibility checks (if possible)

Implementation Notes

  • Start with the sysinfo crate's existing FreeBSD support
  • Consider FreeBSD version compatibility (minimum supported version)
  • Plan for testing on actual pfSense/OPNsense hardware or VMs

Contribution

  • I'm willing to help implement this feature
  • I can help with testing this feature
  • I can help with documentation
  • I can provide feedback during development

Metadata

Metadata

Assignees

Labels

FreeBSDcross-platformMulti-platform compatibility featuresenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededprocmondIssues related to the process monitoring daemon

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions