Using IBM Metrics Collector for SAP (IMCS) on Windows
The IBM® Metrics Collector for SAP (IMCS) on Windows is a requirement by SAP Support for IBM Cloud® Virtual Private Cloud Infrastructure only when SAP workloads are running on the virtual server instance (VSI).
Getting an IBM Cloud API key
You need an IBM Cloud API key for IMCS to successfully collect all required metrics. The API key grants view access to IBM Cloud infrastructure services. You can install IMCS without an API key. However, some metrics are missing and the virtual server is not supported by SAP.
For a list of missing metrics, see Additional Information.
You need to create only one Service ID and one API Key per Account. You can use the same Service ID and API Key for all the Metric Collectors that are installed in the virtual server that is associated to the Account.
Creating a Service ID
You need to first create a Service ID and then the related API key. Use the following steps to create a Service ID.
- Sign in to the IBM Cloud console and click Manage > Access (IAM).
- Click Services IDs > Create.
- Enter a Name and Description for the Service ID and click Create. You can assign the Access Policy after your Service ID is created.
- Click Access Policies > Assign Access.
- Click IAM Services for Assign Service ID additional access.
- Select VPC Infrastructure service for What type of access do you want to assign?
- Select All resource groups for in.
- Leave the default Account for in
- Leave All resource types for Resource type and click Viewer for Platform Access.
- Click Add > Assign. The VPC Infrastructure Service policy is assigned to your Service ID.
Creating an API Key for the Service ID.
Use the following steps to create an API Key for the new Service ID.
- Select Service IDs and your newly created Service ID
- Click the tab Access Policy and verify that the VPC Infrastructure Service is listed as an Access Policy. If not repeat steps 4-9.
- Click the next tab API keys > Create.
- Enter a Name and Description for the key and click Create.
- Click Copy or Download your API key to save it.
Now is the only opportunity to access the API Key data. You cannot view this API key again, so you cannot retrieve it later.
Installing the IBM Metrics Collector for SAP on Windows
The IMCS is a service that automatically starts after the installation is and requires an API key. It collects metrics from the metadata of the virtual server, IBM Cloud infrastructure services, runtime data about resources, such as CPU, memory, network, and disk. The metrics are aggregated and displayed through the web server for SAP customers. SAPOSCOL uses the XML output of this web server.
The IMCS uses port 18181 to show the metrics. Make sure that port 18181
is not used by any other application. For more information on how to check port availability, see Troubleshooting.
The commands that are listed in this section were run in Windows PowerShell 5.1.
Use the following steps to download the IMCS.
-
Select the appropriate .zip. In most cases, use the current version. Connect as guest.
-
Save the file to your internal Downloads folder and click OK.
-
Move or copy the IMCS .zip file to your VPC virtual server instance.
-
Extract the file and open the extracted folder.
-
Run the
install-metric-collector.ps1
file. Right-click on the file and select 'Run with Powershell', or run the following command on the power shell:.\install-metric-collector.ps1
-
Paste your API key when prompted. If you don't have an API key, see Getting an IBM Cloud API key.
-
Check to make sure that the IMCS is running after the installation is complete. The service status displays
Running
when it is ready.Get-Service Telegraf Status Name DisplayName ------ ---- ----------- Running Telegraf Telegraf Data Collector Service
Verifying data collection
After the installation completes and the service is started, it can take time for the IMCS begins collecting metrics. Wait at least 2 minutes after the installation before you expect full and accurate metrics.
-
Open the browser of your choice.
-
Open the following link: http://localhost:18181/sap/metrics
<metrics> <metric category="config" context="vm" device-id="" last-refresh="1607451781" refresh-interval="0" type="string" unit="none"> <name>Data Provider Version</name> <value>1.3</value> </metric> <metric category="config" context="host" device-id="" last-refresh="1607451781" refresh-interval="0" type="string" unit="none"> <name>Cloud Provider</name> <value>IBM Cloud</value> </metric> <metric category="config" context="vm" device-id="" last-refresh="1607451781" refresh-interval="0" type="string" unit="none"> <name>Instance Type</name> <value>bx2-8x32</value> </metric> <metric category="config" context="host" device-id="" last-refresh="1607451781" refresh-interval="0" type="string" unit="none"> <name>Virtualization Solution</name> <value>KVM</value> </metric> . . . </metrics>
You might experience a delay before your data is available. { :note }
Troubleshooting
Use the following troubleshooting tips for IMCS.
Uninstalling the Metrics Collector
-
Run the following command to uninstall IMCS if you have any issues during the installation process. Then, reinstall it.
.\uninstall-metric-collector.ps1
Are you sure you want to uninstall Metric Collector for SAP? (Default is No) ( y / n ) : y Continuing uninstalling metric collector... Removed scheduled task: IBM Metric Collector for SAP Updator Successfully Uninstalled Metric Collector
No metrics reported when you open the link
No reported metrics is often due to the port not assigned to SAP Metrics Collector. It needs port 18181
available for localhost
. If you have any other applications using the port, you must close the applications/owning
process.
-
Use the following command to see whether the port is assigned to another application.
Get-NetTCPConnection -State listen

Additional information
If you don't have an IBM Cloud API key, the IMCS can't collect all of the metrics that are required by SAP, which include
- Network Adapter Mapping - replaced with local MAC ID.
- Network Adapter Bandwidth - Port Speed - defaults to 0.
- Disk Volume Mapping - replaced with Volume Attachment ID.
- Disk Guaranteed IOPS - defaults to 0.
You must provide an API key so that all metrics can be collected. Otherwise, this virtual server is not fully supported by SAP.