If you want to have all of the counters in a counter log be represented in a PAL report, then use the AllCounterStats feature in the PAL Wizard. This will use all of the thresholds in the PAL threshold files as well as ensure that all of the counters are in the report at Stats Only.
With that said, if you deal with many unique counter and don’t want to create your own threshold file yet, then consider using the script discussed in this blog entry as a starting point.
Due to popular demand, I created a Powershell script that will convert a performance counter data collector template into a PAL threshold file. The script is called a non-imaginative PerfmonTemplateToPalThresholdFile.ps1. Be forewarned that the threshold file produced from this will not have any thresholds in it.
For now, I consider it to be beta, so it can be downloaded from:
https://aka.ms/clinth, then go to PAL/BetaTesting
In a few weeks or so, I will include it with the PAL tool – likely v2.4.1.
How to use it
- Ensure Powershell is set to unrestricted – WARNING this can be a potential security risk
- At an administrator Powershell session run: Set-ExecutionPolicy unrestricted
- Place a performance counter data collector template file (it must be in XML format) in the same directory as the script.
- Unblock the script file. Files downloaded from the internet are considered high risk, so go to the properties of the script file and click the Unblock button. Otherwise, the script will not be permitted to run.
- Run the script
- Start a Powershell session and change directory to the script location.
- .\PerfmonTemplateToPalThresholdFile –PerfMonTemplate .\SysTemplate.xml
- A PAL threshold file will be created in the same directory. It will use the DataCollector Name attribute in the template file as the file name.
- Copy the PAL threshold file to the PAL installation directory
- Once the PAL threshold file is created, copy it to the PAL installation directory.
- Run the PAL Wizard and you should see the file in the list of threshold files.
- This script is designed for PAL v2.0 and later.
- The PAL threshold file produced will only create statistics only – no thresholds.
- If you goal is to have all of the counters in a counter log to be represented in the PAL report, then use the AllCounterStats feature.