This guide covers configuration of Statping-ng including environment variables, database setup, notification integrations, monitoring settings, and operational best practices for Linux DevOps environments.
Statping-ng can be configured through:
| Variable | Description | Default | Required | Example |
|---|---|---|---|---|
NAME |
Status page title | Statping |
No | My Services Status |
DESCRIPTION |
Status page subtitle/description | Status Page |
No | Real-time monitoring dashboard |
DISABLE_LOGS |
Disable application logging | false |
No | false |
BASE_PATH |
URL subpath for reverse proxy | / |
No | /status |
| Variable | Description | Default | Example |
|---|---|---|---|
DB_CONN |
Database connection type | sqlite |
sqlite |
SQLite requires no additional configuration. Database file stored in /app volume.
| Variable | Description | Required | Example |
|---|---|---|---|
DB_CONN |
Database type | Yes | postgres |
DB_HOST |
PostgreSQL hostname | Yes | postgres or 192.168.1.50 |
DB_PORT |
PostgreSQL port | No | 5432 |
DB_USER |
Database username | Yes | statping |
DB_PASS |
Database password | Yes | SecurePassword123! |
DB_DATABASE |
Database name | Yes | statping |
| Variable | Description | Required | Example |
|---|---|---|---|
DB_CONN |
Database type | Yes | mysql |
DB_HOST |
MySQL hostname | Yes | mysql or 192.168.1.50 |
DB_PORT |
MySQL port | No | 3306 |
DB_USER |
Database username | Yes | statping |
DB_PASS |
Database password | Yes | SecurePassword123! |
DB_DATABASE |
Database name | Yes | statping |
| Variable | Description | Required | Example |
|---|---|---|---|
VIRTUAL_HOST |
Domain name for routing | For proxy | status.example.com |
VIRTUAL_PORT |
Internal container port | For proxy | 8080 |
LETSENCRYPT_HOST |
Domain for SSL certificate | For SSL | status.example.com |
LETSENCRYPT_EMAIL |
Email for Let’s Encrypt | For SSL | admin@example.com |
| Variable | Description | Default | Example |
|---|---|---|---|
ENABLE_CHECKER |
Enable uptime checker | true |
true |
ENABLE_SCHEDULER |
Enable scheduled tasks | true |
true |
MAX_RESPONSE_SIZE |
Max HTTP response size (bytes) | 1048576 |
1048576 |
SAMPLE_DATA |
Generate sample data on first run | false |
false |
# .env
NAME=My Status Page
DESCRIPTION=Service monitoring dashboard
DB_CONN=sqlite
DISABLE_LOGS=false
# .env
# Application Settings
NAME=Production Status Page
DESCRIPTION=Real-time service monitoring and uptime dashboard
DB_CONN=postgres
# Database Connection
DB_HOST=postgres
DB_PORT=5432
DB_USER=statping
DB_PASS=SecureDbPassword123!
DB_DATABASE=statping
# Optional Settings
DISABLE_LOGS=false
BASE_PATH=/
# Docker Proxy (if using nginx-proxy)
VIRTUAL_HOST=status.example.com
VIRTUAL_PORT=8080
LETSENCRYPT_HOST=status.example.com
LETSENCRYPT_EMAIL=admin@example.com
# .env
# Application Settings
NAME=Production Status Page
DESCRIPTION=Real-time service monitoring dashboard
DB_CONN=mysql
# Database Connection
DB_HOST=mysql
DB_PORT=3306
DB_USER=statping
DB_PASS=SecureDbPassword123!
DB_DATABASE=statping
# Optional Settings
DISABLE_LOGS=false
After initial setup, configure Statping-ng through the admin interface at https://your-domain.com/admin.
Navigate to Admin → Settings:
| Setting | Description | Recommendation |
|---|---|---|
| Site Name | Public status page title | Use descriptive name |
| Site Description | Subtitle/description | Brief overview of monitored services |
| Domain | Public URL | https://status.example.com |
| Language | Interface language | Match team preference |
| Timezone | Display timezone | Server or team timezone |
Navigate to Admin → Notifications:
| Field | Description | Example |
|---|---|---|
| SMTP Host | Mail server hostname | smtp.gmail.com |
| SMTP Port | Mail server port | 587 (TLS) or 465 (SSL) |
| Username | SMTP authentication user | alerts@example.com |
| Password | SMTP password/app password | app-password-here |
| From Address | Sender email address | status@example.com |
| Encryption | TLS/SSL | TLS |
https://hooks.slack.com/services/XXX/YYY/ZZZ#incidents (optional override)https://discord.com/api/webhooks/...123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11-1001234567890For custom integrations (PagerDuty, OpsGenie, custom scripts):
| Field | Description | Example |
|---|---|---|
| URL | Webhook endpoint | https://api.pagerduty.com/... |
| Method | HTTP method | POST |
| Headers | Custom headers (JSON) | {"Authorization": "Token xyz"} |
| Body | Request body template | See below |
Webhook body template example:
{
"service": "{{.Service.Name}}",
"status": "{{.Service.Online}}",
"message": "{{.Failure}}",
"timestamp": "{{.CreatedAt}}"
}
Statping-ng supports multiple monitor types:
| Setting | Description | Example |
|---|---|---|
| Name | Service identifier | Web Application |
| Type | Monitor type | HTTP |
| URL | Endpoint to check | https://example.com/health |
| Method | HTTP method | GET, POST, HEAD |
| Expected Status | Expected HTTP status | 200 |
| Timeout | Request timeout (seconds) | 30 |
| Interval | Check interval (seconds) | 60 |
| Headers | Custom headers (JSON) | {"Authorization": "Bearer token"} |
| Setting | Description | Example |
|---|---|---|
| Name | Service identifier | Database Server |
| Type | Monitor type | TCP |
| Host | Target hostname/IP | db.example.com |
| Port | Target port | 5432 |
| Timeout | Connection timeout | 10 |
| Interval | Check interval | 60 |
| Setting | Description | Example |
|---|---|---|
| Name | Service identifier | DNS Server |
| Type | Monitor type | UDP |
| Host | Target hostname/IP | dns.example.com |
| Port | Target port | 53 |
| Timeout | Connection timeout | 10 |
| Interval | Check interval | 60 |
| Setting | Description | Example |
|---|---|---|
| Name | Service identifier | Network Gateway |
| Type | Monitor type | ICMP |
| Host | Target hostname/IP | 192.168.1.1 |
| Timeout | Ping timeout | 5 |
| Interval | Check interval | 60 |
⚠️ Note: ICMP monitoring requires container capability
CAP_NET_RAWor running as privileged.
| Setting | Description | Example |
|---|---|---|
| Name | Service identifier | DNS Resolution |
| Type | Monitor type | DNS |
| Host | DNS server | 8.8.8.8 |
| Record | DNS record to check | example.com |
| Record Type | Record type | A, AAAA, MX, TXT |
| Expected Value | Expected response | 93.184.216.34 |
Components group related services for better organization.
Navigate to Admin → Components:
| Field | Description | Example |
|---|---|---|
| Name | Component name | API Services |
| Description | Component description | Backend API and microservices |
| Group | Parent component (optional) | Infrastructure |
Configure email subscriptions for status updates.
Navigate to Admin → Subscribers:
| Setting | Description | Recommendation |
|---|---|---|
| Enable Subscriptions | Allow public signups | Enable for public status pages |
| Confirmation Required | Double opt-in | Enable for GDPR compliance |
| Notify on Incident | Send on new incidents | Enable |
| Notify on Resolution | Send on incident resolve | Enable |
| Digest Frequency | Summary email frequency | Daily or Weekly |
.env files in Git (exclude secrets)# Recommended monitoring intervals
intervals:
critical_services: 30 # 30 seconds for critical
standard_services: 60 # 1 minute for standard
non_critical: 300 # 5 minutes for non-critical
external_apis: 120 # 2 minutes for external dependencies
# Recommended alert thresholds
thresholds:
consecutive_failures: 3 # Alert after 3 failures
recovery_confirmation: 2 # Confirm recovery with 2 successes
maintenance_window: true # Allow scheduled maintenance
# Backup command
docker exec statping-postgres pg_dump -U statping -d statping | \
gzip > /backup/statping_$(date +%Y%m%d_%H%M%S).sql.gz
# Restore command
gunzip -c /backup/statping_20260216_020000.sql.gz | \
docker exec -i statping-postgres psql -U statping -d statping
# Backup command
docker exec statping-mysql mysqldump -u statping -p'SecurePassword' statping | \
gzip > /backup/statping_$(date +%Y%m%d_%H%M%S).sql.gz
# Restore command
gunzip -c /backup/statping_20260216_020000.sql.gz | \
docker exec -i statping-mysql mysql -u statping -p'SecurePassword' statping
# Backup SQLite database
docker run --rm \
-v statping_data:/data:ro \
-v /backup:/backup \
alpine cp /data/statping.db /backup/statping_$(date +%Y%m%d_%H%M%S).db
Add to crontab for automated backups:
# Daily backup at 2 AM
0 2 * * * /usr/local/bin/statping-backup.sh >> /var/log/statping-backup.log 2>&1
-- Add indexes for common queries
CREATE INDEX IF NOT EXISTS idx_checks_service_id ON checks(service_id);
CREATE INDEX IF NOT EXISTS idx_failures_service_id ON failures(service_id);
CREATE INDEX IF NOT EXISTS idx_events_service_id ON events(service_id);
-- Vacuum and analyze regularly
VACUUM ANALYZE services;
VACUUM ANALYZE checks;
VACUUM ANALYZE failures;
-- Optimize tables
OPTIMIZE TABLE services;
OPTIMIZE TABLE checks;
OPTIMIZE TABLE failures;
-- Add indexes
CREATE INDEX idx_checks_service_id ON checks(service_id);
CREATE INDEX idx_failures_service_id ON failures(service_id);
| Setting | Description | Recommended |
|---|---|---|
DISABLE_LOGS |
Disable verbose logging | false (enable for debugging) |
| Check intervals | Balance load vs. freshness | 60s standard, 30s critical |
| Data retention | Limit historical data | 90 days for detailed, 1 year aggregated |
# Check running container environment
docker exec statping-ng env | grep -E '^(NAME|DB_|VIRTUAL)'
# Test database connectivity
docker exec statping-ng wget -q --spider postgres:5432
echo "Exit code: $?"
# Check Docker Compose configuration
docker compose config
# Validate environment file
docker compose --env-file .env config
Database Connection Failed:
# Verify database is running
docker compose ps postgres
# Check database logs
docker compose logs postgres
# Test connection from statping container
docker exec -it statping-ng bash
nc -zv postgres 5432
Environment Variables Not Applied:
# Restart container to apply changes
docker compose restart statping-ng
# Verify in container
docker exec statping-ng printenv | grep DB_
Any questions?
Feel free to contact us. Find all contact information on our contact page.