turbot/steampipe-mod-azure-insights

Dashboard: Azure Compute Disk Dashboard

This dashboard answers the following questions:

  • How many disks are in each subscription, resource group and region?
  • How much storage is allocated across all disks?
  • How many unattached disks are there?
  • What are my most used volumes by read and write IOPS?
This dashboard contains 3 cards.

Usage

Install the mod:

mkdir dashboards
cd dashboards
powerpipe mod init
powerpipe mod install github.com/turbot/steampipe-mod-azure-insights

Start the Powerpipe server:

steampipe service start
powerpipe server

Open http://localhost:9033 in your browser and select Azure Compute Disk Dashboard dashboard.

You could also snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe dashboard run azure_insights.dashboard.compute_disk_dashboard --share

Queries

This dashboard uses the the following queries:
with disks as (
select
title,
time_created,
to_char(time_created,
'YYYY-MM') as creation_month
from
azure_compute_disk
),
months as (
select
to_char(d,
'YYYY-MM') as month
from
generate_series(date_trunc('month',
(
select
min(time_created)
from disks)),
date_trunc('month',
current_date),
interval '1 month') as d
),
disks_by_month as (
select
creation_month,
count(*)
from
disks
group by
creation_month
)
select
months.month,
disks_by_month.count
from
months
left join disks_by_month on months.month = disks_by_month.creation_month
order by
months.month;

Tags