Retrieving the performance data of monitor instances

The perfdata API uses the POST method to obtain performance data about monitor instances.

TSWS APIs that use the POST method
API EndpointsDescription
tokenObtains the authToken required to perform all other operations
configdataRetrieves configuration data of monitor instances
perfdataRetrieves performance data of monitor instances

TSWS APIs that use the GET method
API EndpointsDescription
devicesRetrieves a list of monitored devices
instances Retrieves a list of monitored instances 
monitortypesRetrieves a list of monitor types 
tenantsRetrieves a list of tenants 

Before you begin

You must have used the login API to obtain the authToken, which authenticates the user performing the operation. For details, see TSWS authentication.

Request syntax

https://<PresentationServerHostName>/tsws/10.0/api/omprovider/perfdata

Request parameters

ElementDescription
tenantId

Tenant name

Example: *

startTime

Start time in Epoch format.

The start and end times should be in the range of 1 to 24 hours.

Note:

If you want to retrieve current performance data for a time range(Say for example: 24-hours/1-day duration), we recommend to query for the performance data two hours after the time-range since by this time sufficient data points would have been retrieved for a successful response.

If you want to retrieve historical performance data for a time range(Say for example: 72-hours/3-days duration), we recommend to query for the performance data two hours after the time-range since by this time sufficient data points would have been retrieved for a successful response.

endTime

End time in Epoch format.

The start and end times should be in the range of 1 to 24 hours.

Note:

If you want to retrieve current performance data for a time range(Say for example: 24-hours/1-day duration), we recommend to query for the performance data two hours after the time-range since by this time sufficient data points would have been retrieved for a successful response.

If you want to retrieve historical performance data for a time range(Say for example: 72-hours/3-days duration), we recommend to query for the performance data two hours after the time-range since by this time sufficient data points would have been retrieved for a successful response.

typeonly rate is supported
computationCurrently, only avg is supported
attribUniqNameListEnter one or more attributes of the same monitor type.

One of the following elements

If you specify both monUniqName and instKeyList details, only the monUniqName input is used.

monUniqNameUse the monitortypes API to get the monUniqName. You can specify only one monitor type.
instKeyList

Includes serverIdmonTypeId, and monInstId.

 Use the instances API to get the serverId, monTypeId, and monInstId

Sample request with REST client

After you access the REST client, perform the following steps:

  1. Enter the URL for the performance data of monitor instances API. The generic format is:
    https://<PresentationServerHostName>/tsws/10.0/api/omprovider/perfdata
  2. Add a new header row and select Authorization as the header type.
  3. Enter the text authToken followed by the authToken generated through the login API. See TSWS authentication.
  4. Enter the request parameters in JSON format. Ensure that none of the request parameters are empty.
    1. tenantId — the tenant name, for example "*".
    2. Select one of the following options:
      • monUniqName
      • instKeyList that includes serverId, monTypeId, and monInstId.

      Note

      If you provide both monUniqName and instKeyList details, only the monUniqName input is considered.

    3. startTime
    4. endTime

      Note

      The start and end times should be in the range of 1 to 24 hours.

    5. type
      Currently, only rate is supported.
    6. computation
      Currently, only avg is supported.
    7. attribUniqNameList
      Enter one or more attributes of the same monitor type.
  5. Click Send.


Sample JSON response

The following sample JSON response contains the performance data for the perfdata API:

Troubleshooting

When multiple instance keys (instKeyList) details are provided as input, you might receive a 206 Partial Content message in the output. The possible reasons are:

  • All instance keys do not belong to the same monitor unique name. Instance keys are scanned in the order they appear in the instKeyList. The first monitor unique name found from the instance key is considered as a valid monitor unique name and data is retrieved for all instance keys with this monitor unique name. Other instance keys having a different monitor unique name is considered as invalid.
  • Duplicate instance keys are present in the instKeyList.
  • Parameters in the instance key could not be parsed into a valid type.

Check for these conditions and modify the input accordingly.

Related topics

Error rendering macro 'link-window'

Failed to transform the HTML macro template for display. Nested message: The XML content could not be parsed. There is a problem at line 4, column 162. Parser message: Duplicate attribute &#39;report&#39;. at [row,col {unknown-source}]: [4,162]

Developing

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Chase Colvin

    This page states that "The start and end times should be in the range of 1 to 24 hours". However, in my testing the valid time range max is actually 72 hours.

    However, I am having issues getting data for a time range less than 2 hours. Trying for 1 hour does not seem to work. The lowest valid time range I can get to work is 75 minutes.

    Jan 15, 2020 05:15
    1. Chase Colvin

      The minimum seems to be inconsistent. I suspect this has to do with the specific monitor's run cycle, and how that relates to the rolling valid time range. This is merely speculation, however.

      Jan 15, 2020 05:20
    1. Shreya Gurukiran

      Hi Chase Colvin,

      Thanks for your feedback. Our SME had the following response:

      If you want to retrieve current performance data for a time range(Say for example: 24-hours/1-day duration), we recommend to query for the performance data two hours after the time-range since by this time sufficient data points would have been retrieved for a successful response.

      If you want to retrieve historical performance data for a time range(Say for example: 72-hours/3-days duration), we recommend to query for the performance data two hours after the time-range since by this time sufficient data points would have been retrieved for a successful response.

      Have incorporated our SMEs response as a note in the document for the startTime and endTime request parameters. Hence as per our SMEs feedback, closing the comment.

      FYI Krishna Nazare

      Regards,

      Shreya

      Jul 15, 2020 11:50
  2. Peter Kerwin

    Has anyone determined where to find the "attribUniqNameList" parameter? I've searched the outputs of all the other APIs and can't seem to find anything. My best guess is it is a name related to the parameter being monitored but who knows. I keep getting a "Requested attribute list is not supported". Any insight would be appreciated.

    Apr 09, 2020 08:08
    1. Shreya Gurukiran

      Hi Peter Kerwin,

      Our SME had the following response:

      The API URL 'https://<PresentationServerHostName>/tsws/10.0/api/omprovider/perfdata' can get only the performance metrics. You could open a case with BMC Support (https://www.bmc.com/support/support-central.html) to get the required parameter. 

      Closing the comment based on the preceding response.

      FYI, Krishna Nazare

      Regards,

      Shreya

      Jun 30, 2020 01:54