SSL monitoring expiry dates check करने से beyond जाती है। एक complete monitoring setup इनकी monitoring करता है: expire होने वाले certificates, configuration changes, unauthorized certificate issuance, और SSL errors से होने वाला downtime।
Certificate validity 2029 तक 47 days तक गिरने के साथ, proactive monitoring essential हो जाती है — एक missed renewal आपकी site को offline कर देता है।
क्या Monitor करें
| क्या | क्यों | कितनी बार |
|---|---|---|
| Certificate expiry | Expired certificate = site down | Daily |
| Certificate chain | Incomplete chain = कुछ devices fail | Weekly |
| TLS version | Old TLS versions browsers द्वारा disable हो जाते हैं | Monthly |
| CT logs | आपके domain के लिए unauthorized certificates detect करें | Continuous |
| OCSP stapling | Stapling failure performance degrade करती है | Weekly |
| HSTS header | Missing HSTS = downgrade attack के लिए vulnerable | Monthly |
Free Monitoring Options
1. Cron Script (Self-hosted)
#!/bin/bash
# /usr/local/bin/ssl-monitor.sh
DOMAINS="example.com www.example.com api.example.com"
WARN_DAYS=30
ALERT_EMAIL="admin@example.com"
for domain in $DOMAINS; do
expiry=$(echo | openssl s_client -connect "$domain":443 -servername "$domain" 2>/dev/null | openssl x509 -noout -enddate 2>/dev/null | cut -d= -f2)
if [ -z "$expiry" ]; then
echo "ERROR: Can't connect to $domain:443" | mail -s "SSL Monitor: $domain unreachable" $ALERT_EMAIL
continue
fi
expiry_epoch=$(date -d "$expiry" +%s 2>/dev/null)
now_epoch=$(date +%s)
days_left=$(( (expiry_epoch - now_epoch) / 86400 ))
if [ "$days_left" -lt "$WARN_DAYS" ]; then
echo "$domain certificate expires in $days_left days ($expiry)" | mail -s "SSL Expiry Warning: $domain" $ALERT_EMAIL
fi
done
# Add to crontab — run daily at 9am
0 9 * * * /usr/local/bin/ssl-monitor.sh
2. UptimeRobot (SaaS — Free Tier)
- UptimeRobot पर sign up करें
- एक monitor add करें → type: HTTPS
- अपना domain URL enter करें
- SSL expiry alert set करें: expiry से 30 days पहले
- Alerts configure करें: email, Slack, webhook
UptimeRobot हर 5 minutes check करता है और downtime और certificate expiry दोनों पर alert करता है।
3. Certificate Transparency Monitoring
आपके domain के लिए issued unauthorized certificates के लिए CT logs monitor करें:
| Service | कैसे | Cost |
|---|---|---|
| Cert Spotter (SSLMate) | New certificates पर email alerts | Free tier |
| crt.sh | Manual search | Free |
| Facebook CT Monitor | Facebook का monitoring tool | Free |
Paid Monitoring Tools
| Tool | Features | Price |
|---|---|---|
| Better Uptime | SSL + uptime + incident | Free tier / $20+/month |
| Datadog | SSL checks के साथ full infrastructure monitoring | $15+/host/month |
| Pingdom | SSL + uptime + performance | $10+/month |
| StatusCake | SSL monitoring + alerts | Free tier / $20+/month |
Complete Monitoring Config Example
Production site के लिए, multiple layers combine करें:
Layer 1: Certbot auto-renewal (prevents expiry)
Layer 2: Cron script (catches renewal failures — daily email)
Layer 3: UptimeRobot (catches SSL errors — 5-min checks)
Layer 4: CT monitoring (catches unauthorized certs — continuous)
यह आपको defense in depth देता है — कोई single point of failure नहीं।
GetHTTPS के साथ Monitoring
GetHTTPS में built-in monitoring included नहीं है (यह एक certificate issuance tool है)। लेकिन आपका workflow यह होना चाहिए:
- GetHTTPS से certificate issue करें
- Renewal reminder set करें — 90 में से 60th day पर calendar alert
- SSL monitoring add करें — backup के रूप में cron script या SaaS tool
- Production पर auto-renewal के लिए Certbot consider करें
FAQ
Minimum monitoring क्या होनी चाहिए?
Minimum: certificate renewal के लिए calendar reminder (90 में से 60th day) और एक automated check (cron script या UptimeRobot)। Calendar normal renewals catch करता है; automated check failures catch करता है।
Multiple domains कैसे monitor करें?
ऊपर दी गई cron script एक loop में multiple domains handle करती है। UptimeRobot जैसे SaaS tools आपको multiple monitors add करने देते हैं — per domain एक।
क्या staging/development certificates भी monitor करनी चाहिए?
हां, अगर वे Let’s Encrypt certificates हैं जो expire होते हैं। एक expired staging certificate QA और development को block करता है। Minimum, calendar reminder set करें।
सिर्फ expiry नहीं, certificate chain की monitoring के बारे में क्या?
SSL Labs API automated chain verification provide करता है। Quick manual check के लिए:
echo | openssl s_client -connect example.com:443 2>/dev/null | grep "Verify return code"
Chain monitoring के लिए इसे अपनी cron script में add करें।