ICMP Monitor (Ping)
Monitor basic network connectivity using ICMP echo requests (ping). Verify server reachability and measure round-trip time (RTT).
What is an ICMP Monitor?
An ICMP Monitor sends ICMP Echo Request packets (ping) to a target host and waits for Echo Reply packets. It measures latency and detects packet loss.
Use Cases
- Basic Reachability: Verify servers are online
- Network Latency: Measure round-trip time
- ISP Monitoring: Track internet connection stability
- Firewall Testing: Verify ICMP is not blocked
- Routing Issues: Detect network path problems
Configuration Options
Basic Configuration
| Field | Description | Example |
|---|---|---|
| Name | Human-readable identifier | Production Server Ping |
| Host | Hostname or IP address | server.example.com or 8.8.8.8 |
| Packet Count | Number of ping packets to send | 3 (default), 5, 10 |
| Packet Loss Threshold | Max acceptable packet loss % | 10%, 20%, 50% |
| Latency Threshold | Max acceptable RTT (ms) | 100ms, 500ms, 1000ms |
| Interval | Check frequency | 15s, 30s, 60s, 5m |
| Timeout | Max wait time per packet | 5s, 10s, 30s |
Configuration Examples
Basic Server Reachability
{
"type": "icmp",
"name": "Production Server",
"host": "server.example.com",
"packetCount": 3,
"packetLossThreshold": 20,
"interval": 60000,
"timeout": 10000
}Latency-Sensitive Monitoring
{
"type": "icmp",
"name": "CDN Edge Server",
"host": "cdn.example.com",
"packetCount": 5,
"latencyThresholdMs": 50,
"packetLossThreshold": 10,
"interval": 30000
}ISP Uptime Monitoring
{
"type": "icmp",
"name": "ISP Gateway",
"host": "8.8.8.8",
"packetCount": 10,
"packetLossThreshold": 30,
"interval": 60000
}Multi-Region Latency Check
{
"type": "icmp",
"name": "Global Latency Check",
"host": "api.example.com",
"packetCount": 5,
"latencyThresholdMs": 200,
"locations": ["us-east", "eu-west", "asia-pacific"]
}Check Results
Metrics Collected
Each ICMP check provides:
- Packets Sent: Total packets transmitted
- Packets Received: Packets that returned
- Packet Loss %: (Sent - Received) / Sent × 100
- Min RTT: Fastest round-trip time
- Avg RTT: Average round-trip time
- Max RTT: Slowest round-trip time
- Std Dev: Latency variation
Example Output
{
"status": "up",
"packetsSent": 5,
"packetsReceived": 5,
"packetLoss": 0,
"rttMin": 12.5,
"rttAvg": 15.3,
"rttMax": 18.7,
"rttStddev": 2.1
}Failure Conditions
1. Total Packet Loss
All packets lost (0% received). Indicates:
- Host is down
- Network is unreachable
- ICMP is blocked by firewall
2. High Packet Loss
Packet loss exceeds threshold. Indicates:
- Network congestion
- Intermittent connectivity
- Firewall dropping packets
3. High Latency
RTT exceeds threshold. Indicates:
- Network congestion
- Long routing path
- Bandwidth saturation
Best Practices
1. Use as First Line of Defense
ICMP is the most basic check. Use it to detect:
- Server completely offline
- Network connectivity lost
Then layer on TCP and HTTP monitors for application health.
2. Send Multiple Packets
Sending 3-5 packets provides more accurate measurements:
- Averages out transient spikes
- Detects intermittent packet loss
- More reliable than single packet
3. Set Realistic Thresholds
| Scenario | Packet Loss | Latency |
|---|---|---|
| Local network | 0-5% | <10ms |
| Same region | 0-10% | <50ms |
| Cross-region | 0-20% | <200ms |
| International | 0-30% | <500ms |
4. Monitor from Multiple Locations
Check from 2-3 regions to identify:
- Regional network outages
- ISP-specific issues
- Routing problems
5. Combine with Other Monitor Types
ICMP only tests network layer. Also use:
- TCP: Verify ports are open
- HTTP: Verify application responds
Troubleshooting
100% Packet Loss
Possible Causes:
- Host is down
- Firewall blocks ICMP
- Network is unreachable
- DNS resolution failed
Solution:
- Test manually:
ping -c 5 server.example.com - Check if host is up:
# Try TCP instead (port 80/443) nc -zv server.example.com 80 - Verify DNS:
nslookup server.example.com - Check firewall allows ICMP:
# Allow ICMP echo requests sudo iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
High Latency
Possible Causes:
- Network congestion
- Geographic distance
- Poor routing
- ISP throttling
Solution:
- Check routing path:
traceroute server.example.com - Adjust threshold to match expected latency
- Use CDN or edge locations closer to users
Intermittent Packet Loss
Possible Causes:
- Network congestion
- Wi-Fi interference (if wireless)
- Rate limiting
Solution:
- Increase packet count for better averaging
- Raise packet loss threshold (e.g., 20-30%)
- Check network during peak hours
Limitations
1. ICMP Can Be Blocked
Many firewalls and cloud providers block ICMP for security. If ICMP is blocked:
- Use TCP monitors instead
- Whitelist monitoring IPs
- Enable ICMP in firewall rules
2. Doesn't Test Application Health
ICMP only verifies network connectivity. It doesn't check:
- Services are running
- Application responds
- Ports are open
3. Low Priority in Networks
ICMP is often deprioritized by routers. High ICMP latency may not reflect actual application latency.
Common Targets
Public DNS Servers (ISP Monitoring)
- Google: 8.8.8.8, 8.8.4.4
- Cloudflare: 1.1.1.1, 1.0.0.1
- Quad9: 9.9.9.9
Your Infrastructure
- Web servers: api.example.com
- Database servers: db.example.com
- Load balancers: lb.example.com
- Gateways: gateway.example.com
Next Steps
- TCP Monitor: Monitor specific ports
- HTTP Monitor: Monitor web endpoints
- Configure Alert Rules for your ICMP monitors
- Best Practices for effective monitoring