GithubHelp home page GithubHelp logo

zoph-io / subnet-watcher Goto Github PK

View Code? Open in Web Editor NEW
72.0 3.0 8.0 26 KB

AWS VPC Subnets Watcher

Home Page: https://bio.link/zoph

License: GNU General Public License v3.0

Makefile 14.98% Python 85.02%
aws ipv4 subnet vpc

subnet-watcher's Introduction

πŸ” Subnet Watcher

🧠 Rationale - Problem to solve

AWS does not provide any CloudWatch (CW) metrics to monitor available IPs in VPC subnets. It can be difficult to avoid shortages and get alerted when you are approaching the limit.

πŸ“ Description

Subnet-Watcher monitors the remaining free IP addresses in AWS VPC subnets (both public and private) using some CloudWatch custom metrics. It also sets up alerts to provide complete visibility on your VPC CIDR IP space.

  • AvailableIpAddressCount - Number of IP Addresses available
  • TotalIpAddressCount - Quantity of Total IP Addresses in subnet (based on CIDR size minus the 5 AWS reserved Ips)
  • AvailableIpAddressPercent - Percentage of available IP Addresses
  • AvailableNetworkInterface - Number of Elastic Network Interfaces Available (ENI) in VPC (with status = available)

Sample

CW Metrics

AWS recently released VPC IPAM, however, I have not been able to find any benefits from it and it seems to be a costly solution to this problem.

πŸŽ› Parameters

Change it in the Makefile

Parameter Description Required Default Value
Product Name of the Product yes subnet-watcher
Project Name of your Project yes
Environment Name of your environment yes
AWSRegion Used AWS Region (target of deployment) yes eu-west-1
AlertsRecipient Recipient of SNS Message (Alerts) yes
PercentageRemainingWarning Percentage Remaining IP for alerting yes 20

Optional: You can modify the CloudFormation template to specify the VPC_ID (empty by default) as an environment variable, which will cause the check to be performed on the specified VPC.

πŸš€ Deployment

$ make deploy

πŸŽ–οΈ Credits

I was inspired by the following projects and decided to create my own version that met my specific needs and included some additional features.

subnet-watcher's People

Contributors

larntz avatar z0ph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

subnet-watcher's Issues

IPAM

New from AWS: https://aws.amazon.com/about-aws/whats-new/2023/08/amazon-vpc-ip-address-utilization-metrics-aws-resources/

Amazon VPC IP Address Manager (IPAM) now supports three new CloudWatch metrics β€” VpcIPUsage, SubnetIPUsage, and PublicIPv4PoolIPUsage, that allow you to identify underutilized or near full capacity IP address ranges, optimizing your IP address usage on AWS. These metrics proactively track IP address usage across resources such as Amazon Virtual Private Clouds (Amazon VPCs), subnets, and Public IPv4 Pools. You can also set alarms for these metrics in Amazon CloudWatch to receive notifications when an IP address usage threshold is breached. Moreover, for a consolidated view of all IP address-related insights, these metrics are available on the IPAM Dashboard.

The VpcIPUsage metric measures the percentage of IPs allocated to subnets within an Amazon VPC, out of the Amazon VPC’s total IP address space. The SubnetIPUsage metric represents the percentage of IPs that are active, out of the subnet’s total IP address space. The PublicIPv4PoolIPUsage metric measures the number of Elastic IP addresses (EIPs) allocated from the pool, divided by the total number of IPs in the pool. Using these metrics, you can configure CloudWatch to alarm you if any of your resource’s IP address usage goes beyond a certain percentage, so you can take proactive action before the resource runs out of IP addresses. For example, you can associate a secondary IPv4 CIDR to your VPC proactively when your IP address for the VPC reaches 90% usage.

These metrics are available within Amazon VPC IPAM in all commercial AWS Regions, including the AWS GovCloud (US) Regions, but excluding China (Beijing, operated by Sinnet) and China (Ningxia, operated by NWCD).

To learn more, view the Amazon VPC IPAM documentation. There is no additional charge for using this feature. For details on Amazon VPC IPAM pricing, visit our pricing page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.