Documentation
Everything you need to deploy and configure SQL Monitor
Quick Start
Step 1: Clone Repository
git clone https://github.com/dbbuilder/sql-monitor.git
cd sql-monitorStep 2: Setup Database
Choose your central SQL Server and execute the database setup scripts
# Connect to SQL Server
sqlcmd -S your-server,1433 -U sa -P YourPassword
# Execute scripts in numerical order
:r database/01-create-database.sql
:r database/02-create-tables.sql
:r database/03-create-partitions.sql
:r database/04-create-procedures.sql
# ... continue through all scriptsOr use the deployment script: ./deploy-all.sql
Step 3: Deploy Grafana Container
Choose your deployment method: Azure, AWS, or On-Premise
Docker Compose (On-Premise)
# Create .env file
cat > .env <<EOF
DB_CONNECTION_STRING=Server=your-server,1433;Database=MonitoringDB;...
GRAFANA_PASSWORD=admin
EOF
# Start container
docker-compose up -d
# Access Grafana at http://localhost:9001Azure Container Instances
# Deploy to Azure
./Deploy-Grafana-Update-ACR.ps1
# Access at:
# http://your-container.azurecontainer.io:3000AWS ECS Fargate
# Deploy to AWS
./Deploy-AWS.sh
# Access via Application Load BalancerStep 4: Configure Dashboards
Dashboards are automatically provisioned on startup
23 dashboards are included and configured automatically. Access the Dashboard Browser to explore all available dashboards:
- •Instance Health - Overview of all servers
- •Query Store - Plan regression analysis
- •Wait Statistics - Performance bottlenecks
- •Blocking & Deadlocks - Real-time monitoring
Step 5: Start Monitoring
SQL Agent jobs automatically collect metrics every 5 minutes
That's it! Your SQL Servers are now being monitored. The SQL Agent jobs will push metrics to the central database automatically.
✓ Real-time metrics collection (<1% CPU overhead)
✓ 90-day retention with automatic cleanup
✓ Automated alerting via Grafana
✓ PDF export for reports
Deployment Guides
Azure Deployment
Deploy to Azure Container Instances with optional SSL
Step-by-step guide for deploying SQL Monitor to Azure with Application Gateway for SSL termination.
View GuideAWS Deployment
Deploy to AWS ECS Fargate with ALB and ACM
Complete guide for deploying to AWS with Application Load Balancer and free SSL certificates from ACM.
View GuideOn-Premise Docker
Deploy to your own infrastructure with Docker
Simple Docker Compose deployment for on-premise or self-hosted environments.
View GuideSecurity & Authentication
JWT Authentication
SQL Monitor API uses JWT tokens with 8-hour expiration. Configure in your appsettings.json:
{
"Jwt": {
"SecretKey": "your-256-bit-secret",
"Issuer": "SqlMonitor.Api",
"Audience": "SqlMonitor.Client",
"ExpirationHours": 8
}
}Multi-Factor Authentication (MFA)
TOTP-based MFA with QR code generation. Users scan the QR code with Google Authenticator, Authy, or any TOTP-compatible app. 10 backup codes are generated for account recovery.
Role-Based Access Control (RBAC)
Flexible roles and permissions system allows fine-grained access control. Default roles include Administrator, Developer, and Read-Only.
Additional Resources
GitHub Repository
Source code, issues, pull requests, and community discussions
Visit RepositoryAPI Reference
Interactive Swagger/OpenAPI documentation for the REST API
View API DocsDashboard Customization
Learn how to create custom Grafana dashboards and panels
Grafana DocsCommunity Support
Get help from the community or report issues on GitHub
GitHub IssuesNeed Help Getting Started?
Contact us for migration assistance, custom dashboard development, or training
Contact Support