Troubleshooting
This topic describes how to troubleshoot issues for PATROL for Microsoft Azure .
Enable performance diagnostic for Virtual Machine
If you are not getting diagnostic data for Virtual Machine, follow one of the below options to enable performance diagnostic.
Install and configure the Azure Diagnostics extension
Use this procedure to enable performance diagnostic for fewer virtual machines.
- Open the menu for a virtual machine in the Azure portal.
- Select Diagnostic settings in the Monitoring section of the VM menu.
- Select Enable guest-level monitoring if the diagnostics extension hasn't already been enabled.
- A new Azure Storage account will be created for the VM. The name will be based on the name of the resource group for the VM. A default set of guest performance counters and logs will be selected.
- On the Performance counters tab, select the guest metrics you want to collect from this virtual machine. Use the Custom setting for more advanced selection.
- On the Logs tab, select the logs to collect from the virtual machine. Logs can be sent to storage or event hubs, but not to Azure Monitor. Use the Log Analytics agent to collect guest logs to Azure Monitor.
- On the Crash dumps tab, specify any processes to collect memory dumps after a crash. The data will be written to the storage account for the diagnostic setting. You can optionally specify a blob container.
- On the Sinks tab, specify whether to send the data to locations other than Azure storage. If you select Azure Monitor, guest performance data will be sent to Azure Monitor Metrics. You can't configure the event hubs sink by using the Azure portal.
If you haven't enabled a system-assigned identity configured for your virtual machine, you might see the following warning when you save a configuration with the Azure Monitor sink. Select the banner to enable the system-assigned identity. - On the Agent tab, you can change the storage account, set the disk quota, and specify whether to collect diagnostic infrastructure logs.
- Select Save to save the configuration.
PowerShell script to enable metrics in guest diagnostics
Use this procedure to enable performance diagnostic for large number of virtual machines.
- Identify the Windows computer on which you want to run the PowerShell script.
The computer can be one of the VMs in the Azure cloud or one of the servers in your datacenter, like PATROL Agent computer. Download the Azure PowerShell Module 5.0.1 from Azure download link.
- Open PowerShell as an administrator.
- Ensure that the Azure Az modules are installed by running the following command: Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force -AllowClobber
- Download the .
- Extract EnableAzure_VM_Guest_Metrics.zip to C:\scripts.
Run the script as:
PS C:\scripts> .\EnableAzure_VM_Guest_Metrics.ps1
- Enter Azure credentials.
From the list of displayed subscriptions, select the subscription where you want to enable metrics in guest diagnostics.
The script fetches all the VMs of the selected subscription ID and enables the guest diagnostics on the VMs. It enables only the metrics that are required by the KM for monitoring.
Enable or disable KM debug
If you encounter certain problems using this KM, BMC Support might request you to enable the debug. Follow one of the three options to enable debug.
Using PATROL configuration variable
- Access the /PAF/Azure_Accounts/<AccountLabel>/DEBUG pconfig variable
- Set this variable to 1 to enable the debug, and set to 0 to disable the debug
Using the PATROL Console
- From the PATROLMainMap tree, right click <AccountLabel> > KM commands > Debug > Select the check box or clear to disable
Using the TrueSight console
- Edit the KM policy and select the Enable Debug check box. Clear the check box to disable.
The log file is located at %PATROL_HOME %\ pmy \log directory on Windows and $PATROL_HOME /../ pmy /log directory on Linux. The log file name is < PATROLAgentName >-<Port >-< AccountLabel >-AzureSubscription.log .
By default, the maximum size of the log file is 10 MB . It’s a circular log file and will have maximum of 10 instances. (100 MB)
Certification Error
Unable to find valid certification path for a requested target.
Solution
- Go to URL in the browser:
Firefox - Click on HTTPS certificate chain (the lock icon right next to URL address). Click more info> security > show certificate > details > export. Pickup the name and choose file type example.cer
Chrome - Click on site icon left to address in the address bar, select Certificate > Details > Export and save in the format Der-encoded binary, single certificate. - Now, you have the file with keystore and you have to add it to your JVM. Determine the location of cacerts files,
eg., %JAVA_HOME%\lib\security\cacerts
or
%JAVA_HOME%/lib/security/cacerts Then import the example.cer file into cacerts by using command line ( this may require an administrator command prompt):
keytool -import -alias example -keystore /path/to/cacerts -file example.cer
or
keytool -import -alias example -keystore "%JAVA_HOME%\lib\security\cacerts" -file example.cerEnter the default keystore password changeit
- Restart the JVM.
Other issues
BMC recommends to check the following parameters for any basic monitoring issues:
- ConfigurationStatus - Available at top level container Microsoft Azure. Reports errors related to JAVA process launch.
- State - Available at individual application class level containers. Reports if monitoring is ON or OFF.
- MonitoringStatus - Available at individual application class level containers. Reports errors related to data collection failures for respective application classes.
For any other issues, contact BMC support with log files from the <PATROL_HOME>\pmy\log directory.