Managing logs
If you experience any troubles with BMC Release Process Management (BRPM) or the BMC Release Lifecycle Management Requester UI (now called Release Process Management - Requester UI, 5.0.03.001 onward), 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.
New in 5.0.03The 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
New in 5.0.05 Starting from this release, the API authenticity token is displayed in filtered format in the logs. It will be displayed as follows:
version 5.0.03.003 or earlier The following figure shows a sample log file with the system information displayed in the logs:
(jboss.deployment.unit."RPM-knob.yml".job_scheduler_Worker-2)
Available processors: 4, Total JVM (B): 4242014208, Free JVM (B): 1678910912,
Used JVM (B): 2563103296, Thread info: {:total=>109, :http=>7,
:io_worker=>8}, Queue Info:
{"/queues/audit"=>0,
"/queues/torquebox/RPM/tasks/torquebox_backgroundable"=>0,
"/queues/backgroundable/automation"=>0, "/queues/activity_log"=>0,
"brpm_event_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:
For non-high-availability deployment, open standalone-full.xml version 5.0.03.004 or later or standalone.xml
version 5.0.03.004 or later
.
For high-availability deployment, open standalone-full-ha.xml version 5.0.03.004 or later or standalone-ha.xml
version 5.0.03.003 or earlier
.
- In the file, edit the console-handler section as appropriate, and then save the file.
Starting with 5.0.01.00, you can specify the logging level for servers in BRPM.
- 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.03.004 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:
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 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
- New in 5.0.05In Queue - Total number of automations in queue, waiting to be processed by a consumer when available.
New in 5.0.05In Process - Number of automations under execution.
New in 5.0.05Total Added - Total numbers of automations from the time BRPM service was started.
- BackgroundableQueue
- ActivityLogQueue
- ScheduledJobQueue
- AuditQueue
- ScheduledJobExpiryQueue
- ExpiryQueue
- DLQ
- AutomationQueue
New in 5.0.03To configure time interval for system info job for versions 5.0.03.003 or earlier
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/config and open the torquebox.yml file.
- In the file, locate the system.info job section.
The following figure shows the system info job in the sample torquebox.yml file. Under the system.info job, make changes to the cron attribute that match your requirement.
By default, the value is set to 10 minutes. To change the time interval, follow the standard Cron time string format. For example, if you want to change the time interval to 15 minutes, change the string to '0 */15 * * * ?'.
For more information on cron string format and the allowed values and characters, see CRON expression.
Logging in the RLM Requester UI (now called RPM Requester UI, 5.0.03.001 onward)
To view the RLM Requester UI (now called RPM Requester UI, 5.0.03.001 onward) server logs, go to RLMUIhome/apache/logs.
To define the server logging level in the RLM Requester UI (now called RPM Requester UI, 5.0.03.001 onward)
You can specify the server logging level in the RLM Requester UI (now called RPM Requester UI, 5.0.03.001 onward) using the Apache logging configuration.
- Go to RLMUIhome/apache/conf/ and open the httpd.conf file in a text editor.
Edit the following lines as appropriate:
Windows- For error logs:
ErrorLog "|bin/rotatelogs.exe logs/errorlog-%Y-%m-%d.txt 86400" - For other logs:
CustomLog "|bin/rotatelogs.exe logs/accesslog-%Y-%m-%d.txt 86400" common
Linux
- For error logs:
ErrorLog "|<RLMUIhome>/bin/rotatelogs logs/errorlog-%Y-%m-%d.txt 86400" - For other logs:
CustomLog "|<RLMUIhome>bin/rotatelogs logs/accesslog-%Y-%m-%d.txt 86400" common
For more information, see Apache rotatelogs in the Apache documentation.
- For error logs:
New in 5.0.04 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:
[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:
[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. |
Related topic