Debug Your Infrastructure

Get Instant Solutions for Kubernetes, Databases, Docker and more

AWS CloudWatch
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Pod Stuck in CrashLoopBackOff
Database connection timeout
Docker Container won't Start
Kubernetes ingress not working
Redis connection refused
CI/CD pipeline failing

VMs / EC2 Instance Unreachable

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

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.

Master 

VMs / EC2 Instance Unreachable

 debugging in Minutes

— Grab the Ultimate Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Real-world configs/examples
Handy troubleshooting shortcuts
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

VMs / EC2 Instance Unreachable

Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Your email is safe thing.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

MORE ISSUES

Deep Sea Tech Inc. — Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid