Custom Counters

Custom Counter Templates

Collect Data from Any Computer Chart

You can only do this if you're a PerformanceGuard administrator.

If you want PerformanceGuard to collect data from a Computer Chart, you can create a custom counter in PerformanceGuard.

Custom counters are template-based. A template can contain multiple custom counters, and each template can be attached to one or more agent configuration groups. This means that if you want PerformanceGuard agents from different agent configuration groups to collect the same custom counters, you don't need to set up identical custom counters for each agent configuration group—instead you simply link the required agent configuration groups with the required custom counter template. To get you started, PerformanceGuard offers a number of built-in templates.

From PerformanceGuard 6.7.2 there's a change in the way that PerformanceGuard works with Computer Charts. See How Agent Handles No New Data in the following.

Built-in Custom Counter Templates

PerformanceGuard comes with a number of ready-to-use custom counter templates for monitoring the performance of MS Exchange, MS SQL Server, Terminal Services as well as memory, physical disks, etc.

To view the built-in custom counter templates, select ADMINISTRATION > Agent Configuration > Custom Counter Templates.

To use a built-in custom counter template, simply apply it to the required agent configuration groups. See Apply Templates to Agent Configuration Groups in the following.

You can view descriptions of selected counters from the built-in templates, including ideal counter values and what to do if counter values were not ideal, in Custom Counter Advice.

Create Custom Counter Templates

  1. Select ADMINISTRATION > Agent Configuration > Custom Counter Templates.
  2. Click the New Template button.
  3. Specify a Name (required) and a Description (optional) of your template.
  4. In the Counters field, specify the custom counters that the template should contain. You can specify the counters in two different ways:
    • Use Performance Counter Configuration Utility, a tool provided by PerformanceGuard to help you quickly and easily define custom counters with the correct syntax.
    • Enter custom counters directly in the text field. If you want to enter counter definitions directly, see the help system's Technical Reference section for syntax details. If you want to enter counter definitions directly, see the PerformanceGuard Technical Reference Manual for syntax details.

      If you want your custom counter to monitor a process, see Processes with Identical Names.
  5. In the Sample every ... menu, select how often (in seconds) that PerformanceGuard agents should collect the custom counter data.

     Agent configuration group settings also contain a sampling interval setting. Will the two conflict?

    No, the Sample every ... setting only applies for the custom counter template in question. It will therefore not conflict with the agent configuration group setting called Sampling interval in seconds.

  6. In the Report data every ... menu, select how often (in seconds) that agents should calculate the collected data in order to be able to report minimum, maximum and average values to PerformanceGuard.

    The number must be equal to or higher than the Sample every ... number. The number must also be dividable by the Sample every ... number.
  7. Click Save.
Remember that you must link the template to required agent configuration groups. See Apply Templates to Agent Configuration Groups in the following.

Performance Counter Configuration Utility

The Performance Counter Configuration Utility helps you quickly and easily define custom counters with the correct syntax. You can download the Performance Counter Configuration Utility when you create or edit a custom counter template.

Once you have downloaded and saved the utility, you should run it. To make sure that you have access to all counters, you need to run the utility with administrative privileges: Right-click the PerfCounterUtility.exe file and select Run as administrator ....

To define a new custom counter with the Performance Counter Configuration Utility:

  1. Select the required computer in the list in the top left corner of the Performance Counter Configuration Utility window, and then click the Connect button.

     Can I connect to a remote computer?

    Yes, you can use the utility with remote computers too. Simply click the Look Up Remote Computers button to populate the list in the top left corner of the Performance Counter Configuration Utility window with available computers. Alternatively, you can write the name of the remote computer directly in the Select counters for computer list with a syntax like this: computername.domainname. When ready, click the Connect button.

     Can I connect to a computer that's on another domain?

    Yes, write the name of the computer directly in the Select counters for computer list with a syntax like this: computername.domainname. When ready, click the Connect button.

    The method RegistryKey.OpenRemoteBaseKey() is used for retrieving the performance counters on remote computers. To access performance counters on a remote computer, make sure that the Remote Registry service runs on both your own computer and the remote computer that you want to access. Also make sure that you have adequate remote administration permissions to access performance counters on the remote computer.
  2. Select a Category, a Counter and (when possible) an Instance.

     Why can't I see 32-bit performance counters?

    This can happen in mixed 32-/64-bit environments, for example if the PerformanceGuard agent that should read 32-bit dll-based performance counters is a 64-bit agent. To solve this problem, do the following on the computer that runs the agent: Select /Start, type services.msc and press ENTER. Then right-click the service Performance Counter DLL Host, select Properties, set Startup type to Automatic, start the service, and click OK. This will make 32-bit counters available in 64-bit applications. Finally, restart the PerformanceGuard Agent service.

3. Click the Add>> button to add your custom counter to the list of added counters in the right part of the window.

4. Repeat as required. Once you have defined all the counters that you need, select Edit > Copy to clipboard.

5. In the PerformanceGuard web interface, select ADMINISTRATION > Agent Configuration > Custom Counter Templates and then either create or edit the required custom counter template. When ready, paste (CTRL+V) your copied custom counters into the template's Counters box.

Before you save the custom counter template, make sure that you have given it a name and that you have selected sample and report intervals. The settings are described under Create Custom Counter Template in the previous.

Apply Templates to Agent Configuration Groups

  1. Select ADMINISTRATION > Agent Configuration > Configurations.
  2. Click the Edit link next to the required agent configuration group.
  3. On the Agent Configuration tab, scroll down to the Custom Counter Templates section and select the templates that should be used by PerformanceGuard agents that belong to the agent configuration group.
  4. Click the Save Configuration button.
The same custom counter templates can be used by multiple agent configuration groups. Simply repeat the steps.

Edit Existing Templates

To edit an existing custom counter template, select ADMINISTRATION > Agent Configuration > Custom Counter Templates and click the Edit icon  next to the required template.

Delete Templates

To delete an unwanted custom counter template, select ADMINISTRATION > Agent Configuration > Custom Counter Templates, click the Delete icon next to the no longer required template.

If you try to delete a template that's used by one or more agent configurations, PerformanceGuard will warn you. You'll still be able to delete such a template, but if you delete the template, it can of course no longer be used by the agent configuration groups.

Upgrade from Old Versions that Didn't Support Templates

In previous versions of PerformanceGuard you were also able to use custom counters, but you needed to define the custom counters separately for each agent configuration group instead of through templates. This meant that if multiple agent configuration groups should use the same custom counters, you needed to define identical custom counters separately for each agent configuration group. The new templates feature, that lets you define custom counters once, and use them in multiple agent configuration groups, thus significantly reduces the required administration.

Existing custom counters are automatically converted to templates: If you have upgraded from an old version of PerformanceGuard that didn't support custom counter templates, the new PerformanceGuard version automatically converts your existing custom counters to custom counter templates. Any custom counters that you have defined for agent configuration group A will be turned into custom counter template A, and the template will automatically be appended to agent configuration group A. The same thing will happen to any custom counters that you have defined for agent configuration group B, and so on.

If you have templates with identical content after upgrade: Because you may previously have defined identical custom counters for multiple agent configuration groups, you may find that some or all of the new custom counter templates, that PerformanceGuard has automatically created for you during the upgrade, have identical content. If that's the case in your organization, the templates will work even though they have identical content. However, you may want to spend a few minutes on linking agent configuration groups with just one of those identical templates and then deleting the surplus templates.

Processes with Identical Names

If you want a custom counter to monitor a process, bear in mind that multiple instances of the same process may run simultaneously.

Example: If you have two tabs open in Internet Explorer, three instances of the iexplore.exe process will run on your computer—one for Internet Explorer itself, and one for each of the tabs.

You may find it difficult to distinguish between such identically named processes that run simultaneously if you monitor them with a custom counter. In such cases we recommend that you instead use the standard PerformanceGuard performance counter feature (ANALYZE > Computers > Performance Counters) which lets you easily distinguish between multiple instances of the same service.

How Agent Handles No New Data

From PerformanceGuard version 6.7.2 the PerformanceGuard agent acts in a different way if it doesn't receive new data from a performance counter:
When a sample contained no new data from a performance counter, earlier versions of the agent would report a repetition of the previous value to PerformanceGuard. From version 6.7.2 the agent will simply report a value of nothing instead.

The old way (top) and new way (bottom) of handling no new data

Compared with the old way, the new way may feel as if it causes lapses in the sampling. The new way, however, will provide you with a better and more representative data set for analyzing your performance counters.

Windows Performance Counter Reference

For more information about Windows performance counters, go to technet.microsoft.com and search for Windows performance counters.

Search this documentation

On this page

In this section