A lightweight, secure, and cross-platform SNMP daemon built with modern C++.
- Lightweight: Minimal resource footprint with efficient memory usage
- Secure: Built with security best practices and access controls
- Cross-platform: Runs on Linux, macOS, and Windows
- Modern C++: Built with C++17 and modern development practices
- SNMP v2c Support: Full SNMP v2c protocol implementation
- Docker Ready: Containerized deployment with multi-architecture support
- Production Ready: Comprehensive logging, monitoring, and deployment options
# Clone the repository
git clone https://github.com/simpledaemons/simple-snmpd.git
cd simple-snmpd
# Build the project
make
# Install (requires sudo on Unix systems)
make install
# Pull the Docker image
docker pull simpledaemons/simple-snmpd:latest
# Run the container
docker run -d --name simple-snmpd \
-p 161:161/udp \
-v /path/to/config:/etc/simple-snmpd \
simpledaemons/simple-snmpd:latest
# Start with default configuration
sudo simple-snmpd
# Start with custom config
sudo simple-snmpd -c /path/to/config.conf
# Test configuration
simple-snmpd --test-config -c /etc/simple-snmpd/simple-snmpd.conf
# Test with snmpget (if available)
snmpget -v2c -c public localhost 1.3.6.1.2.1.1.1.0
# Test with snmpwalk (if available)
snmpwalk -v2c -c public localhost
Edit /etc/simple-snmpd/simple-snmpd.conf
:
# Network Configuration
port=161
enable_ipv6=true
# Community Configuration
community=public
# Connection Limits
max_connections=100
timeout_seconds=30
# Logging Configuration
log_level=info
# Trap Configuration
enable_trap=false
trap_port=162
See the Configuration Guide for detailed options.
- C++17 compatible compiler (GCC 7+, Clang 5+, MSVC 2017+)
- CMake 3.16 or later
- Git
# Basic build
make
# Build with tests
make test
# Build packages
make package
# Clean build
make clean
# Use the Linux build script
./scripts/build/build-linux.sh
# Build with packages
./scripts/build/build-linux.sh --package
# Use the macOS build script
./scripts/build/build-macos.sh
# Build universal binary
ARCHITECTURES="x86_64;arm64" ./scripts/build/build-macos.sh
# Build multi-platform Docker image
./scripts/build-docker.sh
# Build for specific platform
./scripts/build-docker.sh single linux/amd64
# Enable and start the service
sudo systemctl enable simple-snmpd
sudo systemctl start simple-snmpd
# Check status
sudo systemctl status simple-snmpd
# Copy the plist file
sudo cp deployment/launchd/com.simpledaemons.simple-snmpd.plist /Library/LaunchDaemons/
# Load and start the service
sudo launchctl load /Library/LaunchDaemons/com.simpledaemons.simple-snmpd.plist
# Install as Windows service
sc create "Simple SNMP Daemon" binPath="C:\Program Files\simple-snmpd\simple-snmpd.exe" start=auto
sc start "Simple SNMP Daemon"
# Deploy using the deployment script
./scripts/deploy-docker.sh deploy
# Check status
./scripts/deploy-docker.sh status
# View logs
./scripts/deploy-docker.sh logs
simple-snmpd/
├── src/ # Source code
│ ├── main.cpp # Application entry point
│ └── core/ # Core SNMP implementation
│ ├── snmp_server.cpp # SNMP server
│ ├── snmp_packet.cpp # Packet handling
│ ├── snmp_config.cpp # Configuration
│ ├── logger.cpp # Logging system
│ └── platform.cpp # Platform abstraction
├── include/ # Header files
│ └── simple_snmpd/ # Public API headers
├── config/ # Configuration files
├── deployment/ # Service configurations
├── docs/ # Documentation
├── scripts/ # Build and deployment scripts
└── tests/ # Test suite
The project follows a modular architecture with clear separation of concerns:
- Core: SNMP protocol implementation and server logic
- Platform: Cross-platform abstraction layer
- Configuration: Flexible configuration management
- Logging: Comprehensive logging and error handling
- Deployment: Multi-platform service configurations
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
# Clone and setup development environment
git clone https://github.com/simpledaemons/simple-snmpd.git
cd simple-snmpd
# Install development dependencies
make dev-deps
# Build in debug mode
make dev-build
# Run tests
make test
See ROADMAP.md for the complete development roadmap.
- ✅ Core SNMP daemon implementation
- ✅ Cross-platform build system
- ✅ Basic SNMP v2c support
- ✅ Docker containerization
- ✅ Service configurations
- 🔄 Complete SNMP v2c implementation
- 🔄 SNMP v1 compatibility
- 🔄 Basic MIB support
- 🔄 SNMP trap support
- 🔄 Security enhancements
- Installation Guide
- Quick Start Guide
- Configuration Guide
- Deployment Guide
- User Guide
- Troubleshooting
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Project Documentation
Copyright 2024 SimpleDaemons
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
- Built with modern C++ and cross-platform best practices
- Inspired by the need for lightweight, secure SNMP implementations
- Community-driven development and feedback
Simple SNMP Daemon - Making SNMP monitoring simple, secure, and reliable.