Skip to content

Get started › Connect a provider

Azure

Connect flo8t to an Azure subscription with a service principal that has Reader and Cost Management Reader.

Checked on a real subscription (VMs, a scale set, managed disks, snapshots, VM Insights and Cost Management).

Field Value
Subscription ID, Tenant ID From the subscription
Client ID, Client Secret The app registration (service principal) flo8t signs in as
Log Analytics Workspace ID Optional: the workspace that receives VM Insights, for disk use

Add one provider per subscription. flo8t needs outbound HTTPS to login.microsoftonline.com, management.azure.com, <region>.metrics.monitor.azure.com, api.loganalytics.io (with a workspace) and prices.azure.com.

In Cloud Shell (Bash), as an Owner or User Access Administrator of the subscription:

Terminal window
SUB=<subscription id>
az ad sp create-for-rbac --name float --role Reader --scopes /subscriptions/$SUB
# prints appId (client id), password (secret, shown once) and tenant
az role assignment create --assignee <appId> --role "Cost Management Reader" --scope /subscriptions/$SUB
# only if flo8t runs actions, on the resource groups it may act on:
az role assignment create --assignee <appId> --role "Virtual Machine Contributor" --scope /subscriptions/$SUB/resourceGroups/<rg>
az role assignment create --assignee <appId> --role "Disk Snapshot Contributor" --scope /subscriptions/$SUB/resourceGroups/<rg>

The secret expires, after one year by default. flo8t then shows the provider as failing: create a new secret with az ad sp credential reset --id <appId> and update the provider.

Role What flo8t gets Without it
Reader on the subscription Inventory, performance, Activity Log, Resource Health and Service Health Nothing works
Cost Management Reader The month’s bill so far per VM and disk List prices only
Virtual Machine Contributor Start, stop (deallocate), restart Those actions fail
Disk Snapshot Contributor Snapshot create and delete Snapshot actions fail

If flo8t shows no VMs on a subscription that has some, check that the Microsoft.Compute, Microsoft.Network and Microsoft.Insights resource providers are registered: a new subscription has them unregistered, and Reader can’t register them.

Azure’s own metrics don’t say how full a disk is. flo8t reads it from VM Insights in a Log Analytics workspace. Each VM needs the Azure Monitor Agent, a VM Insights data collection rule, and a managed identity: without the identity, the agent installs but sends nothing. Data appears in flo8t about an hour after the agent starts sending.

What How often
Inventory Every hour
Performance Every 5 minutes, from Azure’s 1-minute values
Events: Activity Log, Resource Health, Service Health Every hour
Disk use Every hour, with VM Insights
Bill Every day, with Cost Management Reader

On the first day, flo8t loads the last 30 days for each VM, so right-sizing can start the next morning.

Metrics come from Azure Monitor’s batch API, billed by Azure at about $0.01 per 1,000 calls after a free monthly allowance: about 8,600 calls a month for 50 VMs, about 864,000 for 5,000 VMs.

  • Hard reset: Azure has none. Restart is a guest restart.
  • Snapshots of scale set instances (Uniform orchestration).
  • Disk use without VM Insights: shown as unknown, never guessed.