Skip to content

Grafana Cloud — Server Monitoring

URL: https://grafana.com (login with Enfection account)


What is Grafana?

Grafana Cloud monitors all Enfection servers in real time. It tracks CPU, memory, disk, and network — and sends alerts when something goes wrong.

Staging Server (EC2)    → Grafana Alloy agent → Grafana Cloud
SonarQube Server (EC2)  → Grafana Alloy agent → Grafana Cloud

Dashboards

Grafana → Dashboards → Integration - Linux Node
→ Linux node / overview
Panel What it shows
CPU Usage Server processing load
Memory Usage RAM used vs available
Disk Usage Storage space used
Network Traffic Data in/out per second
System Load Overall server load average

Alerts Setup

Three critical alerts are configured:

Alert 1: High CPU (>80%)

Triggers when: CPU usage stays above 80% for 5 minutes
Action: Check what process is using CPU
# On server - check top processes
top
htop

Alert 2: Server Down

Triggers when: Server stops responding for 2 minutes
Action: Check AWS console → restart instance if needed
AWS Console → EC2 / Lightsail → Instances
→ Check instance state → Start if stopped

Alert 3: Disk Full (>85%)

Triggers when: Disk usage exceeds 85%
Action: Clean up old files / extend disk
# Check disk usage
df -h

# Find large files
du -sh /home/*/htdocs/* | sort -rh | head -20

# Clean Docker (if used)
docker system prune -f


Alert Notifications

Alerts sent to: devops@enfection.com

To update notification email:

Grafana → Alerting → Contact points
→ enfection-alerts → Edit → update email


Adding New Server to Grafana

When a new server is created (e.g. Lightsail production), install Grafana Alloy:

# On the new server
curl -fsSL https://storage.googleapis.com/cloud-monitoring-installation/grafana-alloy-installer.sh | bash

Then configure with Prometheus remote write pointing to Grafana Cloud.


DevOps — Quick Reference

Check server health right now

Grafana → Dashboards → Linux node / overview
→ Select server from top dropdown

Check alert history

Grafana → Alerting → Alert rules
→ See firing / resolved alerts

Silence an alert (during maintenance)

Grafana → Alerting → Silences
→ New silence → set duration → Save