SSP data monitoring - HMC Rest API

Shared Storage Pool (SSP) Monitoring enables the user to view the Performance and Capacity Monitoring statistics of a given SSP Cluster in HMC. In order to collect SSP Monitoring information we need to enable the attributes of SSP using the REST API.

Monitoring Attributes 


<AggregationEnabled kxe="false" kb="UOD">true</AggregationEnabled>
<MonitorEnabled kb="UOD" kxe="false">true</MonitorEnabled>

The attribute MonitorEnabled is used to enable RawMetrics data collection and AggregationEnabled attribute is used to enable AggregatedMetrics data. These can be set to false to disable and true to enable data collection, in above example is set as true.

Setup REST API Client


There are multiple REST API client application that can be used the prominent is Postman Rest API application. This application was supported as a chrome app but its now deprecated and cannot be used better to install the Postman Windows Application by downloading exe file.

Disable the SSL Verification


After installation is done open the Postman application and click file >> settings >> general >> ssl certificate verification. Turn it off.



Logging in 


We need to login to HMC with correct username and password using the rest api url and get a session id. Once we get a session id we will be able to read / write SSP Monitoring settings with rest api.

Login URL : https://9.x.x.x:12443/rest/api/web/Logon 
Request Type : PUT
Authorization Type : NoAuth
Headers Key : Content-Type  Value : application/vnd.ibm.powervm.web+xml
Body : Raw
<LogonRequest
    schemaVersion="V1_0"
    xmlns="http://www.ibm.com/xmlns/systems/power/firmware/web/mc/2012_10/"
    xmlns:mc="http://www.ibm.com/xmlns/systems/power/firmware/web/mc/2012_10/">
      <UserID>hmcuser</UserID>
      <Password>hmcpassword</Password>
</LogonRequest>

Where 9.x.x.x is hmc ip address, hmcuser and hmcpassword are hmc username and password and this should be changed before requesting.


Response Status : 200
Response :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<LogonResponse xmlns="http://www.ibm.com/xmlns/systems/power/firmware/web/mc/2012_10/" xmlns:ns2="http://www.w3.org/XML/1998/namespace/k2" schemaVersion="V1_0">
    <Metadata>
        <Atom/>
    </Metadata>
    <X-API-Session kxe="false" kb="ROR">abcdefghijklmnopqrtuvwxyz</X-API-Session>
</LogonResponse>

Where abcdefghijklmnopqrtuvwxyz is a rest api session id.

Get General Preferences

Request URL : https://9.x.x.x:12443/rest/api/pcm/preferences
Request Type : Get
Response :

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:ns2="http://a9.com/-/spec/opensearch/1.1/" xmlns:ns3="http://www.w3.org/1999/xhtml">
    <id>d6279982-0016-4c9d-b881-f0c2ae647568</id>
    <title type="text">Performance and Capacity Monitoring Preferences</title>
    <subtitle type="text"/>
    <link rel="self" href="https://9.x.x.x:12443/rest/api/pcm/preferences"/>
    <generator uri="IBM Power Systems Management Console" version="1"/>
    <entry>
        <id>9879689867-c52b-404a-b41f-824f8f26ff6f</id>
        <updated>2020-05-29T03:40:57.460-05:00</updated>
        <title type="text">Performance and Capacity Monitoring Preferences</title>
        <published>2025-05-29T03:40:57.460-05:00</published>
        <author>
            <name>IBM Power Systems Management Console</name>
        </author>
        <content type="application/xml">
            <ManagementConsolePcmPreference:ManagementConsolePcmPreference xmlns:ManagementConsolePcmPreference="http://www.ibm.com/xmlns/systems/power/firmware/pcm/mc/2012_10/" xmlns="http://www.ibm.com/xmlns/systems/power/firmware/pcm/mc/2012_10/" xmlns:ns2="http://www.w3.org/XML/1998/namespace/k2" schemaVersion="V1_0">
                <Metadata>
                    <Atom>
                        <AtomID>895220b7-db08-3b78-bd9c-2b0c4c95a717</AtomID>
                        <AtomCreated>1590741657426</AtomCreated>
                    </Atom>
                </Metadata>
                <MaximumManagedSystemsForLongTermMonitor kxe="false" kb="ROR">45</MaximumManagedSystemsForLongTermMonitor>
                <MaximumManagedSystemsForComputeLTM kb="ROR" kxe="false">60</MaximumManagedSystemsForComputeLTM>
                <MaximumManagedSystemsForAggregation kxe="false" kb="ROR">40</MaximumManagedSystemsForAggregation>
                <MaximumManagedSystemsForShortTermMonitor kb="ROR" kxe="false">5</MaximumManagedSystemsForShortTermMonitor>
                <MaximumManagedSystemsForEnergyMonitor kxe="false" kb="ROR">45</MaximumManagedSystemsForEnergyMonitor>
                <AggregatedMetricsStorageDuration kb="UOD" kxe="false">31536000</AggregatedMetricsStorageDuration>
                <ManagedSystemPcmPreference kxe="false" kb="UOD" schemaVersion="V1_0">
                    <Metadata>
                        <Atom>
                            <AtomID>49422dc5-29ab-3a14-abb2-9312494455b0</AtomID>
                            <AtomCreated>1590741657421</AtomCreated>
                        </Atom>
                    </Metadata>
                    <SystemName kxe="false" kb="ROR">system1</SystemName>
                    <MachineTypeModelSerialNumber kb="ROR" kxe="false" schemaVersion="V1_0">
                        <Metadata>
                            <Atom/>
                        </Metadata>
                        <MachineType kb="ROR" kxe="false">1947</MachineType>
                        <Model kb="ROR" kxe="false">19A</Model>
                        <SerialNumber kb="ROR" kxe="false">PU01947</SerialNumber>
                    </MachineTypeModelSerialNumber>
                    <EnergyMonitoringCapable kxe="false" kb="ROO">true</EnergyMonitoringCapable>
                    <LongTermMonitorEnabled kxe="false" kb="UOD">false</LongTermMonitorEnabled>
                    <AggregationEnabled kb="UOD" kxe="false">false</AggregationEnabled>
                    <ShortTermMonitorEnabled kb="UOD" kxe="false">false</ShortTermMonitorEnabled>
                    <ComputeLTMEnabled ksv="V1_1_0" kb="UOD" kxe="false">false</ComputeLTMEnabled>
                    <EnergyMonitorEnabled kb="UOD" kxe="false">false</EnergyMonitorEnabled>
                    <AssociatedManagedSystem kb="ROO" kxe="false" href="https://9.x.x.x:12443/rest/api/uom/ManagedSystem/49422dc5-29ab-3a14-abb2-9312494455b0" rel="related"/>
                </ManagedSystemPcmPreference>
            </ManagementConsolePcmPreference:ManagementConsolePcmPreference>
        </content>
    </entry>
</feed>

Where 9.x.x.x is the hmc ip address and its managing only one system system1 with machine type 1947, model 19A and serial number PU01947. 

Get SSP Preference

Request URL : https://9.x.x.x:12443/rest/api/pcm/preferences/SSP
Request Type : Get
Response :

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:ns2="http://a9.com/-/spec/opensearch/1.1/" xmlns:ns3="http://www.w3.org/1999/xhtml">
    <id>fdf129e2-cd98-466b-be13-8e2d5afa6095</id>
    <title type="text">Performance and Capacity Monitoring Preferences</title>
    <subtitle type="text"/>
    <link rel="self" href="https://9.x.x.x:12443/rest/api/pcm/preferences/SSP"/>
    <generator uri="IBM Power Systems Management Console" version="1"/>
    <entry>
        <id>8a7b6a66-f002-4ea1-9c46-805e4c0db836</id>
        <updated>2025-05-29T05:38:34.246-05:00</updated>
        <title type="text">Performance and Capacity Monitoring Preferences</title>
        <published>2020-05-29T05:38:34.246-05:00</published>
        <author>
            <name>IBM Power Systems Management Console</name>
        </author>
        <content type="application/xml">
            <ManagementConsolePCMSSPPreference:ManagementConsolePCMSSPPreference xmlns:ManagementConsolePCMSSPPreference="http://www.ibm.com/xmlns/systems/power/firmware/pcm/mc/2012_10/" xmlns="http://www.ibm.com/xmlns/systems/power/firmware/pcm/mc/2012_10/" xmlns:ns2="http://www.w3.org/XML/1998/namespace/k2" schemaVersion="V1_0">
                <Metadata>
                    <Atom/>
                </Metadata>
                <ManagementConsoleSSPPreference kxe="false" kb="UOD" schemaVersion="V1_0">
                    <Metadata>
                        <Atom>
                            <AtomID>abcd1234-ab12-3456-abcd-abcd12345</AtomID>
                            <AtomCreated>1590748714237</AtomCreated>
                        </Atom>
                    </Metadata>
                    <ClusterName kxe="false" kb="ROR">box</ClusterName>
                    <ClusterUdId kxe="false" kb="ROR">22d2ddae709b4411ea8004c00001019ab5</ClusterUdId>
                    <SSPName kxe="false" kb="ROR">ssp</SSPName>
                    <SSPUdId kxe="false" kb="ROR">24d2ddae709b4411ea8004c00001019ab5000000000A210893000000005EC648FD</SSPUdId>
                    <SSPUuId kb="ROR" kxe="false">abcd1234-ab12-3456-abcd-abcd12345</SSPUuId>
                    <AggregationEnabled kxe="false" kb="UOD">false</AggregationEnabled>
                    <MonitorEnabled kb="UOD" kxe="false">false</MonitorEnabled>
                    <RemoteHMCCollectionStatus kb="ROR" kxe="false">false</RemoteHMCCollectionStatus>
                    <AssociatedSharedStoragePool kxe="false" kb="ROR" href="https://9.x.x.x:12443/rest/api/uom/SharedStoragePool/abcd1234-ab12-3456-abcd-abcd12345" rel="related"/>
                    <ManagedNodeSSPPreferences kb="ROR" kxe="false" schemaVersion="V1_0">
                        <Metadata>
                            <Atom/>
                        </Metadata>
                        <NodeMTMS kb="ROR" kxe="false">1947-19A*PU01947</NodeMTMS>
                        <NodeCollectionStatus kb="ROR" kxe="false">On</NodeCollectionStatus>
                        <NodeName kxe="false" kb="ROR">viosv1</NodeName>
                        <NodeId kxe="false" kb="ROR">2</NodeId>
                        <NodeIPAddress kb="ROR" kxe="false">9.x.x.x1</NodeIPAddress>
                    </ManagedNodeSSPPreferences>
                    <ManagedNodeSSPPreferences kb="ROR" kxe="false" schemaVersion="V1_0">
                        <Metadata>
                            <Atom/>
                        </Metadata>
                        <NodeMTMS kb="ROR" kxe="false">1947-19A*PU01947</NodeMTMS>
                        <NodeCollectionStatus kb="ROR" kxe="false">Off</NodeCollectionStatus>
                        <NodeName kxe="false" kb="ROR">vios2</NodeName>
                        <NodeId kxe="false" kb="ROR">3</NodeId>
                        <NodeIPAddress kb="ROR" kxe="false">9.x.x.x2</NodeIPAddress>
                    </ManagedNodeSSPPreferences>
                </ManagementConsoleSSPPreference>
            </ManagementConsolePCMSSPPreference:ManagementConsolePCMSSPPreference>
        </content>
    </entry>
</feed>

Modify the above fields that are in Bold to true and Post the content from 
<AggregationEnabled kxe="false" kb="UOD">true</AggregationEnabled>
<MonitorEnabled kb="UOD" kxe="false">true</MonitorEnabled>


Enabling SSP Monitoring with POST

POST URL : https://9.x.x.x:12443/rest/api/pcm/preferences/SSP
Request Type : POST
Headers Key : Content-Type  Value : application/xml
Request Body : raw as given below

            <ManagementConsolePCMSSPPreference:ManagementConsolePCMSSPPreference xmlns:ManagementConsolePCMSSPPreference="http://www.ibm.com/xmlns/systems/power/firmware/pcm/mc/2012_10/" xmlns="http://www.ibm.com/xmlns/systems/power/firmware/pcm/mc/2012_10/" xmlns:ns2="http://www.w3.org/XML/1998/namespace/k2" schemaVersion="V1_0">
                <Metadata>
                    <Atom/>
                </Metadata>
                <ManagementConsoleSSPPreference kxe="false" kb="UOD" schemaVersion="V1_0">
                    <Metadata>
                        <Atom>
                            <AtomID>abcd1234-ab12-3456-abcd-abcd12345</AtomID>
                            <AtomCreated>1590748714237</AtomCreated>
                        </Atom>
                    </Metadata>
                    <ClusterName kxe="false" kb="ROR">box</ClusterName>
                    <ClusterUdId kxe="false" kb="ROR">22d2ddae709b4411ea8004c00001019ab5</ClusterUdId>
                    <SSPName kxe="false" kb="ROR">ssp</SSPName>
                    <SSPUdId kxe="false" kb="ROR">24d2ddae709b4411ea8004c00001019ab5000000000A210893000000005EC648FD</SSPUdId>
                    <SSPUuId kb="ROR" kxe="false">abcd1234-ab12-3456-abcd-abcd12345</SSPUuId>
                    <AggregationEnabled kxe="false" kb="UOD">true</AggregationEnabled>
                    <MonitorEnabled kb="UOD" kxe="false">true</MonitorEnabled>
                    <RemoteHMCCollectionStatus kb="ROR" kxe="false">false</RemoteHMCCollectionStatus>
                    <AssociatedSharedStoragePool kxe="false" kb="ROR" href="https://9.x.x.x:12443/rest/api/uom/SharedStoragePool/abcd1234-ab12-3456-abcd-abcd12345" rel="related"/>
                    <ManagedNodeSSPPreferences kb="ROR" kxe="false" schemaVersion="V1_0">
                        <Metadata>
                            <Atom/>
                        </Metadata>
                        <NodeMTMS kb="ROR" kxe="false">1947-19A*PU01947</NodeMTMS>
                        <NodeCollectionStatus kb="ROR" kxe="false">On</NodeCollectionStatus>
                        <NodeName kxe="false" kb="ROR">viosv1</NodeName>
                        <NodeId kxe="false" kb="ROR">2</NodeId>
                        <NodeIPAddress kb="ROR" kxe="false">9.x.x.x1</NodeIPAddress>
                    </ManagedNodeSSPPreferences>
                    <ManagedNodeSSPPreferences kb="ROR" kxe="false" schemaVersion="V1_0">
                        <Metadata>
                            <Atom/>
                        </Metadata>
                        <NodeMTMS kb="ROR" kxe="false">1947-19A*PU01947</NodeMTMS>
                        <NodeCollectionStatus kb="ROR" kxe="false">Off</NodeCollectionStatus>
                        <NodeName kxe="false" kb="ROR">vios2</NodeName>
                        <NodeId kxe="false" kb="ROR">3</NodeId>
                        <NodeIPAddress kb="ROR" kxe="false">9.x.x.x2</NodeIPAddress>
                    </ManagedNodeSSPPreferences>
                </ManagementConsoleSSPPreference>
            </ManagementConsolePCMSSPPreference:ManagementConsolePCMSSPPreference>


Validate SSP Preference change

Request URL : https://9.x.x.x:12443/rest/api/pcm/preferences/SSP
Request Type : Get
Verify the xml node arguments AggregationEnabled and MonitorEnabled are set to true

Query SSP Metrics

Once the SSP Monitoring is enabled get the SSPUuId from the above response contents and add it into the below metrics url 

https://9.x.x.x:12443/rest/api/pcm/SharedStoragePool/SSPUuId/RawMetrics
https://9.x.x.x:12443/rest/api/pcm/SharedStoragePool/SSPUuId/AggregatedMetrics

This will appear as below for the above example as SSPUuId is abcd1234-ab12-3456-abcd-abcd12345

RawMetrics

https://9.x.x.x:12443/rest/api/pcm/SharedStoragePool/abcd1234-ab12-3456-abcd-abcd12345/RawMetrics

AggregatedMetrics

https://9.x.x.x:12443/rest/api/pcm/SharedStoragePool/abcd1234-ab12-3456-abcd-abcd12345/AggregatedMetrics

Paste this above raw / aggregate metrics url and the json content link will get generated, for raw metrics it will take from 5-10 minutes and for aggregate metrics it will take more than 8 hours to get generated.

Once json file is generated download it and it can be viewed in to json editor (chrome browser app) or similar application.