DX NetOps Manager

 View Only

Tech Tip: Troubleshoot CA PC App 

Jul 26, 2017 09:55 AM

A CA PC App is an open source application running in CA PC App View or Browser view, typically published on http://github.com/CA-PM

What to check when a CA PC App does not perform as expected? 

 

Preparation

Make yourself familiar with the in-browser debug tool. To launch it in IE/Chrome, hit F12

  • Console log and source code view are of primary interest here. Most apps log meaningful data. It can be viewed at any time.
  • You can view the source code in debugger. Find the app source file (e.g. index.html, Chrome: Ctrl+P, IE: Ctrl+O). In some cases, a trace might be required to inspect variable settings at different stage.

 

Typical errors

no data in app view

verify context parameters and queries -> see “Query verification” below

error messages "HttpRequest" or returncode 403/Forbidden:

A non-admin user is making a request to /pc/da/rest without authorization. see https://communities.ca.com/docs/DOC-231174750-ca-pc-apps-and-user-authorization

 

Query verification

Most apps log the OpenAPI or REST query URL to console for verification.

 

App interactive tracing

The in-browser debugger allows interactive tracing. If the code has callbacks (e.g. for buttons or other controls) you can

  • pause the script execution
  • set breakpoint at callback function
  • resume execution
  • once arrived at breakpoint, hover with the mouse over a variable occurrence. A popup window will display its contents and allow further inspection of array or structure elements

 

Trace App from start

The code might require tracing right from the beginning. Just refresh the page or view while the debugger is open. The execution will stop at the “debugger;” statement in the code.

  • If the app does not already have debugger statement in its code, edit the app file with standard text editor as follows:
    • add “debugger;” statement at the beginning of the main script code

NOTE: Minor in place (debug) edits are fine. In case of permanent changes, don’t forget to maintain its integrity with the app package source.
App location is on CA PC host, /opt/CA/PerformanceCenter/PC/webapps/<APP_LOC> file, where <APP_LOC> is the first part of the URL in the CA PC APP View definition, such as /pc/apps/user/Google-WeatherMap-master/index.html

  • refresh the app page or view while the debugger is open
  • execution will pause at debugger statement
  • set breakpoints in the source code view wherever appropriate, such as
    • parsing routine of query output
    • before calling other library functions
  • resume execution and once arrived at breakpoint, inspect variables of interest

Statistics
0 Favorited
6 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Feb 28, 2019 08:49 AM

Possible reason is a non matching context. E.g. if the app supports device context only and your app view is on interface context, that app will not appear in the dropdown.

Reference: OpenAPI Apps - CA Performance Management - 3.6 - CA Technologies Documentation , look for appConfig.properties file.

Feb 28, 2019 07:36 AM

Hi all,
I am working with the version 3.6 of CA PM, when I made the import of an OpenApi App I do not get any error. But when I want to use it in an Api View it does not appear in the drop-down list. Do you know what you could owe?

Related Entries and Links

No Related Resource entered.