Skip to content

Create Azure Resource Manager requests and find out the remaining requests you have left.

License

Notifications You must be signed in to change notification settings

Nuance-XINFRA/azure-request-limitometer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Request Limitometer

Build Status

NOTE: This software is provided AS IS.

This program makes requests to the Azure Resource Manager API in order to get the headers of the remaining requests available to the API. This is important as if we reach the limit, Kubernetes is no longer functioning properly as it cannot make requests to Azure.

We authenticate with the Managed Service Identity of the VMs running in Azure.

There are curerntly two supported output logic: influxdb and pushgateway

The influxDB format is the following:

> select * from "Microsoft.Compute/HighCostGet3Min" limit 5
name: Microsoft.Compute/HighCostGet3Min
time                requestsRemaining
----                -----------------
1536942668898861850 257
1536942729747705521 257
1536942790585657263 258
1536942850472174265 257
1536942909647820539 258

The PushGateway format is the following:

azurerm_api_resource_request_remaining_count

Element Value
azurerm_api_resource_request_left_count{job="limitometer",type="Microsoft.Compute\HighCostGet30Min"} 646
azurerm_api_resource_request_left_count{job="limitometer",type="Microsoft.Compute\HighCostGet3Min"} 137
azurerm_api_resource_request_left_count{job="limitometer",type="Microsoft.Compute\LowCostGet30Min"} 31522
azurerm_api_resource_request_left_count{job="limitometer",type="Microsoft.Compute\LowCostGet3Min"} 3976
azurerm_api_resource_request_left_count{job="limitometer",type="Microsoft.Compute\PutVM30Min"} 3611
azurerm_api_resource_request_left_count{job="limitometer",type="Microsoft.Compute\PutVM3Min"} 730
azurerm_api_resource_request_left_count{job="limitometer",type="SubIDReads"} 11694

Building the project

The quickest way to build the project is building it with Docker by running the following command on your computer.

docker build -t azure-request-limitometer .

If you want to do it without Docker, you must first make sure you have dep.

go get -u github.com/golang/dep/cmd/dep

From there simply run the following command from your computer.

go build azure-request-limitometer/cmd/limitometer

About

Create Azure Resource Manager requests and find out the remaining requests you have left.

Resources

License

Stars

Watchers

Forks

Packages

No packages published