This topic describes how to troubleshoot issues for PATROL for Microsoft Azure .
PowerShell script to enable metrics in guest diagnostics
- 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 .
- 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 script .
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.
The script works when it can find the storage account associated with each VM.
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)
The more information you gather, the higher the load on your system. When you are finished debugging the problem that you were experiencing, remember to turn off the debug mode by clearing all logging options in the Debug dialog box.
Unable to find valid certification path for a requested target.
- 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,
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.cer
Enter the default keystore password changeit
- Restart the JVM.
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.