Udostępnij za pośrednictwem


Convert a performance counter data collector template into a PAL threshold file

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

or

https://skydrive.live.com/?cid=e6360c54b48a891b&id=E6360C54B48A891B%21428&authkey=!APQbXtD8U-HExzE#cid=E6360C54B48A891B&id=E6360C54B48A891B%215119&authkey=%21APQbXtD8U-HExzE 

In a few weeks or so, I will include it with the PAL tool – likely v2.4.1.

How to use it

  1. Ensure Powershell is set to unrestricted – WARNING this can be a potential security risk
    1. At an administrator Powershell session run: Set-ExecutionPolicy unrestricted
  2. Place a performance counter data collector template file (it must be in XML format) in the same directory as the script.
  3. 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.
  4. Run the script
    1. Start a Powershell session and change directory to the script location.
    2. .\PerfmonTemplateToPalThresholdFile –PerfMonTemplate .\SysTemplate.xml
    3. 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.
  5. Copy the PAL threshold file to the PAL installation directory
    1. Once the PAL threshold file is created, copy it to the PAL installation directory.
    2. Run the PAL Wizard and you should see the file in the list of threshold files.

Considerations

  • 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.

Comments

  • Anonymous
    January 01, 2003
    @Jeff - I am assuming you are wanting to export the PAL Threshold file to a Perfmon Template. If that is so, then the option to 'export to perfmon template file' is available in PAL. (3rd step in the Wizard (Threshold File)).

  • Anonymous
    December 04, 2013
    Clint, can you also provide a converter for the pal threshold file to perfmon template, or does PAL have a directory with all the HTM/XML formats already and I missed it?

  • Anonymous
    December 08, 2013
    Clint I just wanted to say PAL 2.4 you knocked it out of the park great job on the questions section and allowing us to choose the OS this tool is something I recommend to all of my customers again thank you for giving us an awesome easy tool to use.