1

I want to produce an email to be sent with this output for one specific vmname for period of one month:

Server (vmname): 
- primary storage consumption - ... TB (average),
- backup storage consumption - ... TB (average),
- DR storage consumption - ... TB (average),
- storage consumption in total - ... TB.

Is it possible to do it with metrics or powershell? Couldn't find such data in Powershell specified for either vm or storage account.

lubierzca
  • 160
  • 2
  • 14
  • Azure stores the metric in table storage. Could you please elaborate more to get you correct answer? – Jyotsna Oct 10 '18 at 11:10
  • I want to get primary storage consumption for specific virtual machine per month. – lubierzca Oct 10 '18 at 12:56
  • The VM have managed or unmanaged disk. It is not possible to get such data for the managed disk. You can try out a way around by running windows powershell commands inside the vm to get disk space consumed. – Jyotsna Oct 23 '18 at 12:27

3 Answers3

0

The VM have managed or unmanaged disk? It is not possible to get such data for the managed disk. You can try out a way around by running windows powershell commands inside the vm to get disk space consumed.

Jyotsna
  • 326
  • 4
  • 15
  • I tried, but haven't foudn a good command to execute. Didn't you also meant that it's impossible with umananged disks? As we have unmanaged disks and couldn't find any relevant information in storage account. – lubierzca Oct 25 '18 at 07:57
0

For unmanaged, the disk are stored in page blob in vhd format. You would be knowing that page blob is allocated max size and it grows are the data is stored. Try to get the size of vhd file. May be it could help you.

Jyotsna
  • 326
  • 4
  • 15
0

For backup storage, currently the information you are looking for is only available thru Log Analytics or Power BI solution as these are considered metrics on consumption and not directly available via PowerShell/CLI as they are not tagged per VM in REST interface.