Managing logs
If you experience any troubles with BMC Release Process Management (BRPM), you can view the appropriate logs and define the cause of the problem.
The following video (4:00) demonstrates how to enable debug for BRPM:
https://www.youtube.com/watch?v=xo3qKE_i9RI
Viewing logs in BRPM
- To view BRPM server logs, go to RLMhome/server/jboss/standalone/log/server.log.
- To view BRPM automation logs, go to RLMhome/automation_results.
The following system information about JVM memory details is available in the BRPM server logs:
- Available processors
- Heap Memory (total, used, free)
- Total JVM (B)
- Used JVM (B)
- Free JVM (B)
- Threads (http & Net I/O)
- Thread info
- Number of DB connections
- Queue Info
Starting from this release, the API authenticity token is displayed in filtered format in the logs. It will be displayed as follows:
"authenticity_token"=>"[FILTERED]"
The following figure shows a sample log file with the system information displayed in the logs:
[SystemInfo] (EE-ManagedScheduledExecutorService-default-Thread-1)
Available processors: 8, Total JVM (B): 17039360000, Free JVM (B): 15834697248,
Used JVM (B): 1204662752, Thread info: {:total=>184, :http=>0, :io_worker=>0},
DB pool info: {:size=>450, :connections=>15, :busy=>11, :idle=>4, :checkout_timeout=>40},
Queue Info: {:AutomationQueue=>{"In Queue"=>25, "In Waiting"=>5, "In Process"=>20, "Total Added"=>50},
:BackgroundableQueue=>{"In Queue"=>0}, :ActivityLogQueue=>{"In Queue"=>0}, :ScheduledJobQueue=>{"In Queue"=>0},
:AuditQueue=>{"In Queue"=>0}, :ScheduledJobExpiryQueue=>{"In Queue"=>0}, :ExpiryQueue=>{"In Queue"=>0}, :DLQ=>{"In Queue"=>0}}
To configure the server logging in BRPM
To define the advanced logging parameters for servers in BRPM, modify the JBOSS logging configuration:
Go to RLMhome/server/jboss/standalone/configuration and open one of the following files:
Configuration Deployment File HTTP Non-high-availability standalone-full.xml High-availability standalone-full-ha.xml HTTPS Non-high-availability standalone-full-https.xml High-availability standalone-full-ha-https.xml - In the file, edit the
console-handler
section as appropriate, and then save the file.
To specify the logging level for servers in BRPM, do the following:
- Stop the BRPM server.
- Go to RLMhome/bin, and then open the start.bat (Windows) or start.sh (Linux) file in a text editor.
- In the file, modify the value of the
LOG_LEVEL
variable as appropriate. - Save the file.
To configure time interval for system info job for versions 5.0.04 or later
By default, the system info job runs at a 10 minute interval. To modify the time interval, perform the following steps:
- Go to RLMhome/releases/vv.rr.nn/RPM/portal.war/WEB-INF/config and open the wildfly.yml file.
In the file, locate the system.info job.
The following figure shows the system info job in the sample wildfly.yml file.jobs: system.info: job: SystemInfo every: 600 # (seconds), every 10 minutes description: Display system level info like JVM Heap memory, threads, db connections audit.storage: job: AuditHandler::MessagesProcessor every: 60 #every 1 minute description: Stores queued audit messages scheduled_jobs.expired: job: ScheduledStepExpiredJob every: 3600 #every hour description: Notify users when scheduled step is expired
- Under the
system.info
job section, make changes to the job attribute that match your requirement.
By default, the value is set to 10 minutes. To change the time interval, enter the updated value in seconds.
Output for system.info job log
The following output is generated in the system.info
job log:
[SystemInfo] (EE-ManagedScheduledExecutorService-default-Thread-9)
Available processors: 8, Total JVM (B): 16824926208, Free JVM (B): 13101834424, Used JVM (B): 3723091784,
Thread info: {:total=>161, :http=>0, :io_worker=>0}, DB pool info: {:size=>450, :connections=>4, :busy=>1, :idle=>3, :checkout_timeout=>40},
Queue Info: {:AutomationQueue=>{"In Queue"=>0, "In Waiting"=>0, "In Process"=>0, "Total Added"=>6}, :BackgroundableQueue=>{"In Queue"=>0}, :ActivityLogQueue=>{"In Queue"=>0}, :ScheduledJobQueue=>{"In Queue"=>0}, :AuditQueue=>{"In Queue"=>0}, :ScheduledJobExpiryQueue=>{"In Queue"=>0}, :ExpiryQueue=>{"In Queue"=>0}, :DLQ=>{"In Queue"=>0}}
The parameters in the log are described as follows:
- Available processors - The total number of processors
- Total JVM (B) - The total JVM in bytes
- Free JVM (B) - Free JVM in bytes
- Used JVM (B) - Used JVM in bytes
- Thread info
- DB pool info
- Queue Info - Information about the job queue which provides the following information:
- AutomationQueue
In Queue - Number of automations in queue
In Queue = In Waiting + In Process
- In Waiting - Number of automations waiting to be processed
- In Process - Number of automations being processed
Total Added - Total numbers of automations from the time BRPM service was started.
This number automatically resets when BRPM is restarted.
- BackgroundableQueue
- ActivityLogQueue
- ScheduledJobQueue
- AuditQueue
- ScheduledJobExpiryQueue
- ExpiryQueue
- DLQ
- AutomationQueue
Logging API and UI requests which take longer time to load
The server.log will now log the request notifications which take longer time to load. This enhancement is applicable for UI and API HTTP requests.
The output for the logs are as follows:
- Output for Slow API
When the API HTTP request takes more than 5 seconds to load, the following output is generated in the server.log:
17:23:59,361 WARN [RPM] (http-/10.129.96.178:8080-12) [user-]
[Slow API Request Notification]
URL: '/brpm/v1/apps.json', Type: 'GET',
Completed in: 166848ms, Started at: '2020-09-15 17:21:12 +0530', Finished at: '2020-09-15 17:23:59 +0530',
Recommendations: 'The include_except and alone filters in V1 API are available in only 5.0.03.004 and later versions of RPM. Use these filters to limit the data in API response and hence, reduce the API response time, Checkout documentation for more information',
payload: {:controller=>"V1::AppsController", :action=>"index", :params=>{"token"=>"c18e43dfb27534534ba64ca41b79846c4c55ab54", "filters"=>{"name"=>"Test Application", "alone"=>"true"}, "action"=>"index", "controller"=>"v1/apps", "format"=>"json"}, :format=>:json, :method=>"GET", :path=>"/brpm/v1/apps.json", :status=>200, :view_runtime=>99724.0, :db_runtime=>66152.0}
- Output for Slow UI
When the UI HTTP request takes more than 10 seconds to load, the following output is generated in the server.log:
2020-09-29 18:36:40,586 WARN [Wildfly] (default task-16) [user-admin]
[Slow UI Request Notification]
URL: '/brpm/reports/maps/servers_by_app',
Type: 'GET',
Completed in: 13863ms,Started at: '2020-09-29 18:36:26 +0530',Finished at: '2020-09-29 18:36:40 +0530',
Recommendations: '',
payload: {:controller=>"MapsController",:action=>"servers_by_app", :params=>{"controller"=>"maps", "action"=>"servers_by_app"}, :format=>:html, :method=>"GET", :path=>"/brpm/reports/maps/servers_by_app", :status=>200, :view_runtime=>5403.0, :db_runtime=>8455.0}
To get desired output
The user must enter the following search items to get the respective output log:
Search item | Desired output | Example |
---|---|---|
Slow API Request Notification | To get the list of APIs which take longer time to load | grep 'Slow API Request Notification' server.log |
Slow UI Request Notification | To get the list of UIs which take longer time to load | grep 'Slow UI Request Notification' server.log |
Description of the ‘Slow UI/API Request Notification’
The fields in the Slow UI/API Request Notification can be described as follows:
Fields | Description |
---|---|
URL | URL of the request |
Type | Type of HTTP request, for example, GET|POST|PUT|DELETE |
Completed in | Time taken for HTTP request to complete |
Recommendations | Information regarding delay in response time is displayed in case of V1 API |
Payload | The 'params' key in this field displays the parameters passed to the HTTP request. The list of filter parameters is displayed. The user can check the parameters with the documentation and correct them if necessary. |
Comments
Log in or register to comment.