A professional Go Fiber server with a clean, minimal API focused on health monitoring.
- 🚀 Built with Go Fiber - Fast HTTP framework
 - 🏥 Health check endpoint
 - 🔍 WebRCA incident monitoring (checks OpenShift WebRCA API every 30 minutes)
 - 🔧 Environment-based configuration
 - 📝 Structured logging
 - 🌐 CORS support
 - 🛡️ Error handling middleware
 - 📁 Standard Go project layout
 
- Go 1.21 or higher
 - Git
 
- Clone the repository:
 
git clone <repository-url>
cd dora-metrics- Install dependencies:
 
go mod tidy- Copy environment file:
 
cp .env.example .env- Run the server:
 
go run .The server will start on http://localhost:3000 by default.
GET /api/v1/healthReturns server health status, uptime, and version information.
GET /Returns basic server information and available endpoints.
The server can be configured using a YAML file (configs/config.yaml) with environment variable overrides:
Create configs/config.yaml:
server:
  port: "3000"
  environment: "development"
  log_level: "info"
webrca:
  enabled: true
  api_url: "https://api.openshift.com/api/web-rca/v1/incidents"
  interval: "30m"
  # OCM token should be set via environment variable OCM_TOKEN for securityEnvironment variables override YAML settings:
| Variable | Default | Description | 
|---|---|---|
PORT | 
3000 | 
Server port | 
ENVIRONMENT | 
development | 
Environment (development/production) | 
LOG_LEVEL | 
info | 
Log level | 
WEBRCA_ENABLED | 
true | 
Enable WebRCA incident checking | 
WEBRCA_API_URL | 
https://api.openshift.com/api/web-rca/v1/incidents | 
WebRCA API URL | 
WEBRCA_INTERVAL | 
30m | 
WebRCA check interval | 
OCM_TOKEN | 
`` | OCM token for WebRCA API authentication | 
Following the Go Standard Project Layout:
.
├── cmd/
│   └── server/
│       └── main.go          # Application entry point
├── internal/
│   ├── config/
│   │   └── config.go        # Configuration management
│   ├── handlers/
│   │   └── handlers.go      # HTTP handlers and routes
│   └── server/
│       └── server.go        # Server setup and configuration
├── configs/
│   └── config.yaml          # Application configuration
├── go.mod                   # Go module definition
├── Dockerfile               # Docker configuration
└── README.md                # This file
# Set your offline token
export OFFLINE_TOKEN="your_offline_token_here"
# Run the application
go run cmd/server/main.go# Build the application
go build -o bin/dora-metrics cmd/server/main.go
# Run the binary
./bin/dora-metricsgo test ./...To run with Docker:
# Build the image
docker build -t dora-metrics .
# Run the container
docker run -p 3000:3000 dora-metrics- Fork the repository
 - Create a feature branch
 - Make your changes
 - Add tests if applicable
 - Submit a pull request
 
This project is licensed under the MIT License - see the LICENSE file for details.