Active IQ and AutoSupport Discussions
Active IQ and AutoSupport Discussions
Hi
We are currently working on writing a simple integration using the Active IQ Unified Manager API and Powershell for extracting volume specific attributes. We have found most of the information using simple queries as follows:
$NetAppVolumeRecordsAll = Invoke-RestMethod -Method Get -UseBasicParsing -Uri "https://<NETAPP IP>/api/datacenter/storage/volumes?order_by=name&max_records=100000" -Headers $authheader
$NetAppVolumeRecord = $NetAppVolumeRecordsAll.records | Where-Object name -eq "<VOLUME NAME>"
$NetAppGatewayVolumeRecords = Invoke-RestMethod -Method Get -UseBasicParsing -Uri "https:// <NETAPP IP>/api/v2/gateways/ $($NetAppVolumeRecord.cluster.uuid)/storage/volumes?name=$($NetAppVolumeRecord.name)&fields=**&return_records=true&return_timeout=15" -Headers $authheader
We are trying to replicate the same behavior as our current reporting code, which is based on an imported BIRT report built in Eclipse a while back:
select cluster.name as Cluster, vserver.name as SVM, volume.name as Volume,
volume.size/POW(1024,3) as size_gb,
volume.sizeUsed/POW(1024,3) as used_gb,
(volume.deduplicationSpaceSaved+compressionSpaceSaved)/POW(1024,3) as saved_gb,
volume.sizeUsedBySnapshots/POW(1024,3) as snapshot_gb,
(volume.sizeUsed+volume.deduplicationSpaceSaved+compressionSpaceSaved+sizeUsedBySnapshots)/POW(1024,3) as total_gb,
volume.isEncrypt as Encrypted, volume.qosPolicyGroupId as QoS
from cluster
join vserver
on vserver.clusterId = cluster.objid
join volume
on volume.vserverId = vserver.objid
AND volume.name NOT LIKE 'MDV_%'
AND volume.name NOT LIKE 'vol0'
AND (volume.junctionPath != '/' OR volume.junctionPath IS NULL)
ORDER BY SVM, Volume asc;
But we have a hard time working out the correct way to query for the volume.deduplicationSpaceSaved and compressionSpaceSaved attributes. We have so far been unable to find these using the API documentation and trial and error, could you please help us with pointer to the correct endpoint or method for also requesting information for these attributes for a given volume?
Best regards
/Henrik
AIQ UM and ONTAP versions?
Sorry, forgot to mention that
Active IQ Unified Manager
Version: 9.7P1
ONTAP
NetApp Release 9.6P6:
Hi Henrik,
You might be interested in this PowerShell Module I've developed for Active IQ
/Matt
Thank you very much.
Allthough I can only see:
If($SavingsGB){
[String]$uri += $("&space.efficiency.savings=" + ($SavingsGB * (1024 * 1024 * 1024)))
[Bool]$query = $True
Wich only os for global space saving (datacenter/storage/aggregates)
Nothing on volume level.