🦥 SLOzy - SLO made lazy and easy
A tool for creating and managing Service Level Objectives (SLOs) with comprehensive alerting support.
- 🎯 SLO Creation - Define service level objectives with targets
- 📊 Multiple Indicators - Support for latency, availability, throughput
- 🔔 Integrated Alerting - Generate Prometheus rules, AlertManager configs
- 📈 Grafana Dashboards - Auto-generated dashboards for monitoring
- 📝 Documentation - Automatically generate README files
- 🎨 Web UI - Intuitive web interface for SLO management
- 📋 Templates - Pre-built templates for common services
- 🏷️ Autocompletion – Smart hints for metrics, teams, owners
- 📈 Visualization – Preview SLO burn rates before saving
- 🎛 Multi-file Generation – All configs packaged in ZIP
- 🌐 CORS Support – Direct integration with frontend
- 📑 Template Editor – Edit existing or create new templates
- Go 1.22 or later
- No external dependencies required for development
- systemd and Nginx for production deployment
# Clone the repository
git clone https://github.com/philyuchkoff/slozy.git
cd slozy
# Build the application
make build
# Run in development mode
make runFor production deployment, please follow the comprehensive Deployment Guide.
Quick deployment using the automated script:
# Clone the repository
git clone https://github.com/philyuchkoff/slozy.git
cd slozy
# Run the installation script (requires sudo)
sudo ./deploy/install.sh
# Configure your environment
sudo nano /opt/slozy/.env
# Start the service
sudo systemctl start slozy
# Check status
sudo systemctl status slozy# Build the image
docker build -t slozy .
# Run with persistent storage
docker run -d \
--name slozy \
-p 8080:8080 \
-v $(pwd)/data:/app/data \
slozyOpen your browser to: http://localhost:8080 (or your configured host/port)
- Navigate to http://localhost:8080
- Click "Create SLO"
- Fill in service information:
- Service name and description
- SLO name and description
- Metric source and query
- Target percentage and threshold
- Team and labels
- Configure alerting:
- Enable alerting
- Set notification channels (Slack, email, PagerDuty, Telegram)
- Configure burn rate thresholds
- Set severity levels
- Click "Generate & Download"
- Receive ZIP archive with:
- OpenSLO YAML file
- Prometheus alert rules (optional)
- AlertManager config (optional)
- Grafana dashboard JSON (optional)
- README with instructions
curl -X POST http://localhost:8080/api/slo/create \
-H "Content-Type: application/json" \
-d @slo-config.json \
-o slo-files.zipSLOzy includes pre-built templates:
- Web API – Latency and availability for HTTP services
- Database – Query latency and availability
- Kubernetes – Infrastructure SLOs
- Message Queue – Throughput and latency
- Load Balancer – Request latency
- Cache System – Response time
- Object Storage – Availability and latency
- Mobile App – Crash-free users and performance
- CI/CD Pipeline – Build success rate
- IoT Devices – Device availability
- Monitoring Systems – Service uptime
- Navigate to http://localhost:8080
- Click "Templates" tab
- Click "Create Template"
- Fill in template details
- Save template - automatically available
# Server Configuration
export PORT=8080 # Server port
export DATA_DIR=./data # Data directory
export TEMPLATES_DIR=./templates # Templates directory
export STATIC_DIR=./static # Static files directory
# Alerting Configuration
export TELEGRAM_BOT_TOKEN=your_bot_token # Telegram bot token
export TELEGRAM_CHAT_ID=your_chat_id # Telegram chat ID
export SMTP_HOST=localhost:25 # SMTP server
export SMTP_FROM=slo-alerts@example.com # Email from address
export GRAFANA_URL=https://grafana.example.com # Grafana base URLslozy/
├── cmd/slozy-server/ # Application source
│ ├── internal/ # Internal packages
│ │ ├── config/ # Configuration management
│ │ ├── generators/ # File generators
│ │ ├── handlers/ # HTTP handlers
│ │ ├── middleware/ # HTTP middleware
│ │ └── models/ # Data models
│ └── main.go # Application entry
├── static/ # Web UI assets
├── templates/ # SLO templates
├── data/ # Generated SLO files
├── bin/ # Build output
├── Makefile # Build commands
└── README.md # This file
make devRequires air for hot reload (go install github.com/air-verse/air@latest).
make build # Build application
make run # Run application
make dev # Run in development mode
make test # Run tests
make clean # Clean build artifacts
make install # Install system-wide
make deps # Download dependencies
make lint # Run linter
docker-build # Build Docker image
docker-run # Run in Docker container
make web # Open web interface# Build image
docker build -t slozy:latest .
# Run container
docker run -p 8080:8080 \
-v $(PWD)/data:/app/data \
slozy:latestOr use docker-compose:
docker-compose upOnce SLOs are created:
The generated YAML files can be used with any OpenSLO-compatible tool.
Import the generated alert rules into your Prometheus server:
curl -X POST http://localhost:9090/api/v1/rules \
-H "Content-Type: application/yaml" \
--data-binary @service-slo-prometheus-alerts.yamlImport the JSON dashboard files:
- Navigate to Grafana
- Click "+" → "Import"
- Upload the dashboard JSON file
- Select data source
- Save dashboard
The generated configuration includes:
- Routes for different severity levels
- Integration with Slack, email, PagerDuty, Telegram
- Inhibition rules to prevent alert spam
apiVersion: v1
kind: Deployment
metadata:
name: slozy
spec:
replicas: 1
selector:
matchLabels:
app: slozy
template:
metadata:
labels:
app: slozy
spec:
containers:
- name: slozy
image: slozy:latest
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: slozy-service
spec:
selector:
app: slozy
ports:
- port: 80
targetPort: 8080resource "docker_image" "slozy" {
name = "slozy"
build_dir = "${path.module}"
}
resource "docker_container" "slozy" {
image = docker_image.slozy.latest
name = "slozy"
ports {
internal = 8080
external = 8080
}
}# Clean build
make clean && make build
# Update dependencies
go mod tidy
# Verify Go version
go version # Should be 1.21+# Check port usage
lsof -i :8080
# Use different port
PORT=9090 ./bin/slozy
# Check logs
./bin/slozy 2>&1 | tee slozy.log
# Verify data directory permissions
ls -la data/# macOS/Linux
chmod +x ./bin/slozy
# Windows
icacls slozy.exe /grant Everyone:FThe project follows Go project layout:
- cmd/ - Application entry points
- internal/ - Private application code
- static/ - Static assets
- templates/ - SLO templates
- examples/ - Usage examples
-
Generators (cmd/slozy-server/internal/generators/)
openslo.go- OpenSLO YAML generationprometheus.go- Prometheus alert rulesalertmanager.go- Alertmanager configurationgrafana.go- Grafana dashboard JSONreadme.go- Documentation generation
-
Handlers (cmd/slozy-server/internal/handlers/)
slo.go- SLO CRUD operationstemplate.go- Template management
-
Models (cmd/slozy-server/internal/models/)
slo.go- Data structuresvalidator.go- Input validation
-
Middleware (cmd/slozy-server/internal/middleware/)
logging.go- Request/response logging
SLOzy generates fully compliant OpenSLO v1alpha files:
- API version: openslo/v1alpha
- SLO object with metadata and spec
- Time windows with rolling/budgeting support
- Indicator configuration based on type
- Alert policies with burn rate conditions
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Add tests if applicable
- Run linter:
make lint - Run tests:
make test - Submit pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Built using Go with standard libraries only. OpenSLO specification by the OpenSLO community. Icons and visual design credit to original authors.
Made with ❤️