Installing and Using the Samples

If you did not install the samples during Application Center Setup, install them by running Setup and selecting only the Samples option. Application Center installs the samples on your hard disk and sets up sample monitoring rules in Health Monitor.

Bb687508.note(en-us,TechNet.10).gif Note   You can also copy the .mof file from the Application Center CD (from \Program Files\Microsoft Application Center\Samples\Samples.mof and \Samples\Addperfcounters.mof) to your hard disk, and then compile it by using the directions in the following section.

Bb687508.caution(en-us,TechNet.10).gif Caution   Selecting other options in Setup might cause these options to be re-installed and overwritten.

Using the Samples

ASP Files

To use the ASP samples, set up the Samples directory as a virtual directory. Then, modify certain areas of the .asp files, such as the database name, DNS name, or others. Additionally, modify and activate the Health Monitor rules.

Bb687508.note(en-us,TechNet.10).gif Note   These samples are designed to work with Application Center Events and Performance Logging and SQL Server databases and might not work with other types of databases.

To set up virtual directories, use the IIS snap-in. Because the ASP samples contain privileged information about your database, such as the connection string, consider your security requirements while setting up the virtual directory. The virtual directory should use integrated Microsoft Windows NT® authentication to ensure that it is secure and that only authorized individuals can gain access to it. As well, use IP address restrictions to allow only the local server access to the directory.

The Windows user account for accessing the ASP samples should be a low-privilege, local account, preferably designed for this purpose only.

You must alter the .asp files slightly before they will work in your specific situation. The connection strings must reflect your database name, user name, and password. For more specific details about this modification, see Modifying the Samples.

Bb687508.caution(en-us,TechNet.10).gif Caution   Because these applications transmit user name and password information over the network, be sure to take appropriate security precautions.

.mof Files

A .mof file is a text file, used by WMI, that contains definitions of the classes and instances in the MOF language. The sample .mof files are compiled and registered during Application Center Setup. If you did not install the .mof files during Setup, you must compile the .mof files for the additional performance counters.

Two .mof files are included in the the Application Center CD (in \Program Files\Microsoft Application Center\Samples\). The Samples.mof is installed if you selected the Sample Monitors option during installation. You can use the Addperfcounters.mof to add custom performance counters to the Application Center performance chart. Instructions for doing this are in Perfcountersreadme.txt.

You need to compile the additional performance counter .mof files to create and register the Health Monitor rules that are associated with these counters. To compile the .mof file, at the command prompt, type

mofcomp samples_dir\Samples.mof

Where samples_dir is the path to the Samples directory.

You must active the Health Monitor rules that are created by compiling the .mof file.

To activate the Health Monitor rules

  1. In the Health Monitor snap-in, expand All Monitored Computers, expand the server_name node, and then expand Sample Monitors.

  2. To find the monitor to change, continue expanding the appropriate nodes.

  • For more information about editing Health Monitors rules, see the Health Monitor Help.

  • For more information about security and setting up virtual directories, see the IIS Help.

  • For more information about .mof files and the Mofcomp utility, see the Platform SDK in the MSDN Library.

Did you find this information useful? Please send your suggestions and comments about the documentation to acdocs@microsoft.com.