page_type | languages | products | name | description | urlFragment | ||
---|---|---|---|---|---|---|---|
sample |
|
|
Azure Orphan Resources Grafana Dashboard |
This Grafana dashboard offers a centralized view of Azure orphan resources that can be safely removed to reduce the overall cost of owning your Azure subscriptions. |
azure-orphan-resources-grafana-dashboard |
In cloud computing, it is crucial to follow best practices when building a reliable, high-performing, and secure environment. However, it is equally important to implement a strategy aimed at reducing the total cost of ownership. In this context, this Grafana dashboard offers a centralized view of Azure orphan resources that can be safely removed. By identifying and removing these unnecessary resources, you can effectively decrease the overall cost associated with maintaining their Azure subscriptions and increase the operational efficiency.
This dashboard is influenced by the Azure Orphaned Resources 2.0 project developed by my colleague Dolev Shor. It incorporates and integrates some of the queries he designed for his Azure workbook, which can be created and utilized within the Azure Portal. You can refer to the Azure workbook documentation to learn more about creating and utilizing workbooks in the Azure Portal.
You can host the Grafana dashboard in Azure Managed Grafana, your own Grafana installation in an AKS cluster, or any Kubernetes cluster with access to the public internet.
The dashboard performs a series of queries using the Kusto Query Language and Azure Resource Graph to individuate unused, orphan resources that can be safely removed from your Azure subscriptions without impacting the operability of your cloud hosted workloads. Azure Resource Graph is an Azure service designed to extend Azure Resource Management by providing efficient and performant resource exploration with the ability to query at scale across a given set of subscriptions so that you can effectively govern your environment.
For more information Azure Resource Graph, you can refer to the following links:
Here is the list of the resources currently supported by the dashboard:
- App Service Plans
- App Service Environments
- Availability Sets
- Managed Disks
- Load Balancers
- Route Tables
- Application Gateways
- Application Gateway WAF Policies
- Front Door WAF Policies
- Traffic Manager Profiles
- Virtual Networks
- Subnets
- Network Interfaces
- Virtual Network Gateways
- Network Security Groups
- NAT Gateways
- Public IP Addresses
- Public IP Prefixes
- IP Groups
- Private DNS Zones
- Private Endpoints
- Private Link Services
- SQL Elastic Pools
- Resource Groups
Please note that all the resources mentioned above come with an associated cost. Some resources like Availability Sets, Route Tables, Subnets, IP Groups, and Resource Groups are available free of charge.
To import the dashboard into Azure Managed Grafana, follow these steps:
- Go to the Azure Portal and navigate to your Azure Managed Grafana resource.
- Click
Identity
underSettings
. - Ensure that the system-assigned managed identity is enabled.
- Click on the
Azure role assignments
button. - Assign the Monitoring Reader role to the Grafana managed identity, scoped to your Azure subscription or Management Group.
- Click on the
Endpoint
URL on theOverview
page of your Azure Managed Grafana resource. - In the Grafana dashboard, go to
Connections
and ensure that you have anAzure Monitor
datasource. If not, create one and selectManaged Identity
as the authentication mechanism. - Click on the
Load subscriptions
button to test the data source. - Go to
Dashboards
, click onNew
, and then selectImport
. - Upload the dashboard JSON file or copy and paste the JSON code into the textbox, then click the
Load
button. - Choose a category for the dashboard and click the
Import
button. Upload Dashboard to Azure Managed Grafana
Before importing the dashboard into your own Grafana installation, you need to create a service principal under your Microsoft Azure AD account and assign the Monitoring Reader role to it. Once done, follow these steps:
- In the Grafana dashboard, go to
Connections
and ensure that you have anAzure Monitor
datasource. If not, create one and specify thetenant id
,client Id
, andclient secret
of your service princiapl as shown in the following picture: - Click on the
Load subscriptions
button to test the data source. - Go to
Dashboards
, click onNew
, and then selectImport
. - Upload the dashboard JSON file or copy and paste the JSON code into the textbox, then click the
Load
button. - Choose a category for the dashboard and click the
Import
button.