Spectrum RESTful query taking a long time to return values
search cancel

Spectrum RESTful query taking a long time to return values

book

Article ID: 68662

calendar_today

Updated On:

Products

Spectrum

Issue/Introduction

Running a Spectrum Restful query to retrieve 21 attributes from about 800 interface models is taking 85 seconds + to complete.

 

Environment

Release: All Supported Versions

Cause

Possible issue is with external attributes being requested.

External attributes need to be read at the time of request and require that we wait for the SNMP call to return.

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/spectrum/23-3/getting-started/attribute-and-relation-definitions/attributes.html

Resolution

Check the attributes being requested and look for any that may be external attributes. This can be done by doing the following:

1. Log into OneClick

2. Find and select a model where you are retrieving the attribute values for

3. Click on the Attributes tab in the Component Detail panel

4. Filter for and select the attribute

5. Check for the word "External" to be highlighted at the bottom of the view in the "Flags" area.

 

Spectrum must perform an snmpget to retrieve attributes that are "External".

This will add time to the retrieval of the data.

Additional Information

To see how long the API calls are taking, you can enable 

RESTful Web Services

debug in the OneClick webpage

The calls will be logged to <SPECROOT>/tomcat/logs/localhost_access_log..<DATE>.txt

You can see Spectrum hitting the rest url and how long the call takes in milliseconds

- sys [01/Nov/2023:01:20:29 +0000] GET /spectrum/restful/devices?attr=0x129fa&attr=0x1006e&attr=0x11ee8&attr=0x1102a&attr=0x10001&attr=0x10000&attr=0x11026&attr=0x10009&attr=0x23000e&attr=0x12d7f&attr=0x110df&attr=0x10052&attr=0x210ffa&attr=0x12de0&attr=0x10053&attr=0x23000d&attr=0x23000c&attr=0x11620&attr=0x129e7&attr=0x10030&attr=0x10032&attr=0x11c014b&start=0&throttlesize=30000 HTTP/1.1 200 155912 510581