A modular and extensible monitoring system written in Go that monitors server resources and container status.
- Server resource monitoring:
- CPU usage
- Memory usage
- Disk usage
- Container monitoring:
- Container status
- Container health
- Alert system:
- Email notifications
- Modular design for easy extension
.
├── config/
│ └── config.yaml # Configuration file
├── internal/
│ ├── alert/ # Alert system implementation
│ ├── config/ # Configuration management
│ └── monitor/ # Monitoring implementations
├── go.mod # Go module file
├── main.go # Application entry point
└── README.md # This file
Edit config/config.yaml to configure:
- Monitoring intervals
- Resource thresholds
- Container details
- Email alert settings
- Install dependencies:
go mod download-
Configure the system in
config/config.yaml -
Build the application:
go build- Run the monitoring system:
./devopsTo add new monitoring capabilities:
- Create a new monitor implementation in
internal/monitor/ - Implement the
Monitorinterface - Add configuration in
config/config.yaml - Register the new monitor in
main.go
- Go 1.21 or higher
- Docker (for container monitoring)
- SMTP server access (for email alerts)