DrDroid

VMs / EC2 Instance Unreachable

The VM/EC2 instance is not reachable over the network.

Debug vms-ec2 automatically with DrDroid AI →

Connect your tools and ask AI to solve it for you

Try DrDroid AI

Diagnosing and Resolving 'Instance Unreachable' Alerts in Prometheus

Understanding Prometheus and Its Purpose

Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. It is designed to record real-time metrics in a time-series database, built using a highly dimensional data model. Prometheus is widely used for monitoring cloud infrastructure, including VMs and EC2 instances, due to its powerful alerting capabilities.

For more information about Prometheus, visit the official Prometheus website.

Symptom: Instance Unreachable

One common alert that users might encounter is the 'Instance Unreachable' alert. This alert indicates that a VM or EC2 instance is not reachable over the network, which can disrupt services and applications running on the instance.

Details About the 'Instance Unreachable' Alert

The 'Instance Unreachable' alert is triggered when Prometheus detects that it cannot communicate with a specific instance. This could be due to several reasons, such as network configuration issues, instance state problems, or firewall restrictions. Understanding the root cause is crucial for resolving the alert efficiently.

Common Causes of the Alert

  • Security group rules blocking traffic.
  • Network ACLs (Access Control Lists) misconfigured.
  • The instance is stopped or terminated.
  • Incorrect routing table configurations.

Steps to Fix the 'Instance Unreachable' Alert

To resolve the 'Instance Unreachable' alert, follow these detailed steps:

Step 1: Verify Instance State

Ensure that the instance is in a running state. You can check this in the AWS Management Console or by using the AWS CLI:

aws ec2 describe-instances --instance-ids i-1234567890abcdef0

If the instance is stopped, start it using:

aws ec2 start-instances --instance-ids i-1234567890abcdef0

Step 2: Check Security Group Rules

Security groups act as a virtual firewall for your instance. Ensure that the security group associated with your instance allows inbound traffic on the necessary ports. For SSH access, port 22 should be open:

aws ec2 describe-security-groups --group-ids sg-12345678

Modify the security group if needed:

aws ec2 authorize-security-group-ingress --group-id sg-12345678 --protocol tcp --port 22 --cidr 0.0.0.0/0

Step 3: Review Network ACLs

Network ACLs are another layer of security that can block traffic. Ensure that the ACLs associated with your subnet allow the necessary traffic. You can view and edit these settings in the VPC section of the AWS Management Console.

Step 4: Verify Route Tables

Ensure that the route table associated with your subnet has a route to the internet gateway if your instance needs to be accessible from the internet. Check the route table settings in the AWS Management Console.

Additional Resources

For more detailed troubleshooting, refer to the AWS EC2 Troubleshooting Guide. Additionally, the Prometheus Alerting Documentation provides insights into configuring and managing alerts effectively.

Frequently asked questions

What causes Instance Unreachable? +

The VM/EC2 instance is not reachable over the network.

Get root cause analysis in minutes

  • Connect your existing monitoring tools
  • Ask AI to debug issues automatically
  • Get root cause analysis in minutes
Try DrDroid AI