DX NetOps

 View Only
  • 1.  Large queries with openAPI in CAPM

    Posted May 18, 2020 02:55 PM

    how to return large queries using openAPI in CA Performance center ?

    How to read the CPU consumption history of an ID when above 180 days using the default tool API?

    Modifying the "Configure Maximum Results" parameters did not resolve the query issue of 180 days or more.

    Cássio Pinheiro



    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------


  • 2.  RE: Large queries with openAPI in CAPM

    Broadcom Employee
    Posted May 18, 2020 04:07 PM
    Does it timeout or just not return results?

    over 180 days it should query weekly data.  So when selecting time range, be sure to select Week resolution.

    Url will contain like:  &resolution=WEEK&starttime=<timestamp>&endtime=<timestamp>


  • 3.  RE: Large queries with openAPI in CAPM

    Posted May 18, 2020 04:19 PM
    Hi Pinard

    I get it, the placement. but how can I have the result based on pooling. i need a longer period with a low granulity (pooling).

    See my command :
    http://10.100.40.33:8581/odata/api/cpumfs?$select=Timestamp,im_Utilization&$filter=(DeviceItemID%20eq%204698))&period=1d&$top=10000&$format=application/json;odata=verbose

    Cassio

    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------



  • 4.  RE: Large queries with openAPI in CAPM

    Posted May 18, 2020 04:22 PM
    i need a longer period with a low granularity (pooling).

    Cassio

    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------



  • 5.  RE: Large queries with openAPI in CAPM

    Broadcom Employee
    Posted May 18, 2020 04:37 PM
    Sorry, I was thinking daily was shorter retention.   Daily actually can do upto 365 days.  After 365 days, weekly is used.
    Hourly can only do upto 90 days OOTB.  Past that you need to use daily.

    So, that will only show as many daily data points are available upto 10000.

    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/it-operations-management/performance-management/3-7/apis/openapi/configure-openapi-defaults-and-limits.html

    The default time is 30 secs (defaultQueryTimeoutSecs) to return an answer before it fails, but can go up to 120 (maxQueryTimeoutSecs) by using &timeout=120 in the URL.  See if it works with &timeout=120.   You can always change the defaultQueryTimeoutSecs to 120 to match max (and even extend max if you need to query a large time range).

    maxTopLimit limits the max to 20000 for $top, so if there are more then 20000 daily points for 180+ days, then to get them all, you need to increase that.



  • 6.  RE: Large queries with openAPI in CAPM

    Posted May 18, 2020 04:56 PM
    Pinard,

    We've already changed the parameter maxTopLimit for more(200000). However, the consultation is not being able to go beyond the last 45 days.

    How would you make a query for a period of 15, but starting 90 days ago ( February ).

    Cássio Pinheiro

    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------



  • 7.  RE: Large queries with openAPI in CAPM

    Broadcom Employee
    Posted May 18, 2020 05:19 PM
    Yeh, I just tried to do last 12 months and only got 100 results for daily resolution.

    I believe it's due to expand value of 100.
    So the "$top=10000" refers to the number of items matched, and the "top=100" refers to how many rows per item found to include in results.

    I think you need to increase the defaultExpandTopLimit value from 100 to like 360.

    Then run your query, and since you only want a few cpus on the 1 device, you probably don't need  &$top=10000, just let it use the default of 50.


  • 8.  RE: Large queries with openAPI in CAPM

    Posted May 19, 2020 11:23 AM
    Hi Pinard,

    It follows the conclusion.

    There is a better proposal amendment a little, but not enough. We changed the resolution (hours/days/week) to reach the destination, but we lost granularity.
    Let's end up like this. Thank you.

    Cássio Pinheiro

    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------



  • 9.  RE: Large queries with openAPI in CAPM
    Best Answer

    Broadcom Employee
    Posted May 19, 2020 12:12 PM
    If you are looking to get 5 min at 180 days, it's not gonna happen unless you increase the retention period to longer, which means having disk space to store it.  Same goes for hourly past 90 days.

    So only thing available after 90 days OOTB is daily.  And with the increase in expand top value, you should be able to see 365 daily data points.

    You can increase the OOTB retention policy to store more as-polled or hourly data points. It's upto you and your resources available.
    Note: if you do increase, it'll take those many additional days to reach the new number of days to keep.  We can't bring back previously collected data.