ai4eutils/azure-metrics-calc-storage-...
REDMOND\dan 1997d8969a Azure metrics dir rename 2019-03-11 16:32:16 -07:00
..
docs Azure metrics dir rename 2019-03-11 16:32:16 -07:00
README.md Azure metrics dir rename 2019-03-11 16:32:16 -07:00
metrics-data.py Azure metrics dir rename 2019-03-11 16:32:16 -07:00
utils.py Azure metrics dir rename 2019-03-11 16:32:16 -07:00

README.md

Overview

This tool will return the total blob and file sizes for all storage accounts in an Azure subscription.

Installing dependencies

pip install azure==4.0.0 
pip install pandas==0.24.1
pip install --upgrade pip enum34
pip install humanfriendly

Running the application

Run the following command:

python metrics-data.py

The application will ask you to log in; the following page will open in a browser:

login

Copy the input code from the browser URL:

login

Paste the input code in theto code field:

login

Click "continue", after which you might be asked to log in again. Once you see the following message in the browser, return to the command prompt:

login

Next you will be prompted to enter the name of the subscription that you would like to examine. If the application was unable to find a subscription with the subscription name entered, you will be prompted to re-enter the subscription name. If the application was able to find a matching subscription it will continue with execution.

In your command prompt you should see the script enumerating storage accounts.

Review results

Once the code has run successfully you should see a message like “Metrics saved to file: metrics_03-06-19-125503.csv”.

The metrics file will be saved in the same directory as the code. Columns will be:

Storage account, Resource group, Blob capacity, File capacity, Total capacity

...with capacity values specified in bytes. These represent the average storage consumed over the last 24 hours by each storage account, as recorded by Azure Metrics.