I get the example requests working from the REST API programmer's guide. Since I do not want to study the XSDs in detail to figure out how a request should be formed, I am asking for help here. I would like to retrieve the following 3 nuggets of information for each volume in our storage arrays.
- Volume name
- Allocated space
- Used space
I assume it is possible to retrieve this information. Does someone have this request to put in the body of a call in XML or JSON? If so, could you please share it? Thanks!
You can get this data at the pool level with the REST API, but not at the device/volume level.
To get the pool names, send a POST to URI https://ip.ip.ip.ip:8443/univmax/restapi/performance/ThinPool/keys with a body of {"thinPoolKeyParam":{"symmetrixId":"000195701111"}}. You'll want to replace your ip and symmetrixId as appropriate. This will also give you the time range of data that Unisphere has available for these pools.
Once you have that, you can query an individual pool with a POST to URI https://ip.ip.ip.ip:8443/univmax/restapi/performance/ThinPool/metrics with a body of {"thinPoolParam":{ "startDate" : "1394142900000", "endDate" : "1394145000000", "symmetrixId" : "000195701111", "poolId" : "POOL_NAME", "metrics" : ["ALLOCATED_POOL_CAPACITY_GB", "USED_POOL_CAPACITY_GB", "TOTAL_POOL_CAPACITY_GB"] } }. Again, replace the symmetrixId, POOL_NAME, and startDate/endDate with values relevant to your system.
If getting this information at the pool level is not granular enough, then perhaps you can use the XML output from SYMCLI instead of the REST API?
Thanks! I have tested your queries, but I am missing the names of the individual pools. Is that a metric or field that can be added to the query?
I am not a Storage engineer and not very familiar with the vMAX, but is it correct that the individual pools have as name 4 digits? What is the relation between an individual pool and a volume? An individual pool can have multiple volumes?
I know our engineers have added a meaningful name to the volumes / pools. I assume that would be a 3rd query to retrieve that name for each pool / volume?
In case the REST API is not sufficient in terms of granularity.could you please share the Symcli command to retrieve the information that is needed? It would be extremely helpful.
The first query I posted will show you the pool names. You should see a JSON key/value pair with keys named "poolId" and values with the names of the pools. For example, in this case the pool name is TF62_TH3CF -- { "poolId": "TF62_TH3CF", "firstAvailableDate" : 1394142900000, "lastAvailableDate": 139414500000 }
If you can post the output here (or email it to me -- firstname.lastname at emc.com), I can tell you where the pool names are in the output.
For getting the device level capacity information via SYMCLI's XML output, try "symcfg -sid list -tdev -gb -output xml_e". Or, if you have traditional volumes (not VP), you can use "symdev -sid list." You can then parse the output with the language and XML module of your choice. I have an example of this here -- Parsing SYMCLI’s XML Output with Python.
Sorry for the thread necromancy but I'm wondering if anyone has solved this issue using the new API available for Unisphere for VMAX? I'm currently using the V8.0.3.5 (target) version of Unisphere for VMAX vApp against a VMAX100K and I'm after exactly the same details as OP.
I can get the volume id, assigned names and assigned total capacity via the newer API however I can't seem to get anything for how much each volume has consumed - at least it seems non-obvious to me.
I *can* see the consumed vs available via the sloprovisioning/srp for the thin pool in general but I'd like to be able to drill down further if possible.
As I'm using the vApp I'd rather not resort to setting up a separate Solution Enabler server.
if you navigate into the storage group for the volumes in question from the SLO dashboard, you can select and double click. On the Top right of the screen you will see Related Objects, from here click into Volumes and youw ill see what each is consuming.
You can also run the Storage Groups Demands report directly from the Storage Groups Dashboard and that will tell you how much space you are consuming on a storage group level as well as how much snapshot space you are consuming.
Let me know if this helps and answers
Edit: Just noted you are looking for the REST API function.. BRB
Just noticed your post edit. Yes indeed - I'm looking for a method to retrieve the capacity consumed for a volume (rather than total capacity of the volume!) via the REST API so I can integrate it with some internal reporting tools that we use in our company.
Is this enhancement request now in place ? I was attempting to get the consumed capacity of a volume this afternoon and did not have much luck ( I also posted a question regarding the same moments go ). Unsure if the url is formatted correctly -
seancummins
2 Intern
•
226 Posts
3758
1
Posted March 24th, 2014 12:00
Hi,
You can get this data at the pool level with the REST API, but not at the device/volume level.
To get the pool names, send a POST to URI https://ip.ip.ip.ip:8443/univmax/restapi/performance/ThinPool/keys with a body of {"thinPoolKeyParam":{"symmetrixId":"000195701111"}}. You'll want to replace your ip and symmetrixId as appropriate. This will also give you the time range of data that Unisphere has available for these pools.
Once you have that, you can query an individual pool with a POST to URI https://ip.ip.ip.ip:8443/univmax/restapi/performance/ThinPool/metrics with a body of {"thinPoolParam":{ "startDate" : "1394142900000", "endDate" : "1394145000000", "symmetrixId" : "000195701111", "poolId" : "POOL_NAME", "metrics" : ["ALLOCATED_POOL_CAPACITY_GB", "USED_POOL_CAPACITY_GB", "TOTAL_POOL_CAPACITY_GB"] } }. Again, replace the symmetrixId, POOL_NAME, and startDate/endDate with values relevant to your system.
If getting this information at the pool level is not granular enough, then perhaps you can use the XML output from SYMCLI instead of the REST API?
Hope that helps,
- Sean