Machine Agent Element

The machine-agent element is a child of the Agent element. An empty machine-agent element enables the default instrumentation for the .NET machine agent. See Monitor CLRs and Monitor IIS

Enable optional additional Microsoft Performance Counters or .NET Agent instrumentors as children of the Machine Agent element.

Required Element: <machine-agent/>

Machine Snapshot Element

The machine-snapshot element is a child of the machine-agent element. Use it to tune the settings for machine snapshots in your environment. If you do not specify an attribute, the agent uses the default values for that attribute. See Machine Snapshots for .NET and Configure Machine Snapshots for .NET.

Optional Element: <machine-snapshot enabled= "true" window-size= "600" samples-per-window= "60" violations-per-window= "6" max-percent-cpu= "80" max-percent-memory= "80" max-queue-item-age= "100" periodic-collection= "600" />

Machine Snapshot enabled attribute

Set the machine-snapshot enabled attribute to false to disable machine snapshots.

Type: Boolean

Default: true

Required: No

Machine Snapshot window size attribute

Specify the window size time range in seconds for the .NET Machine Agent to take samples. During a window, the agent takes samples and checks them for breached thresholds: max percent CPU, max percent memory, and max queue item age.

Type: Integer

Default: 600

Required: No

Machine Snapshot samples per window attribute

Specify the number of samples the .NET Machine Agent takes during the specified window. For example, if the window size is 600 and the samples per window is 60, the agent takes a sample once every 10 seconds.

Type: Integer

Default: 60

Required: No

Machine Snapshot violations per window attribute

When the .NET Machine Agent detects the number of violations per window for one threshold, it takes a snapshot. The agent only takes one snapshot per window for thresholds exceeded. For example, if violations per window is set to 6, and six samples show memory usage at 80% or greater, the agent takes a snapshot. The counters for each threshold are separate.

Type: Integer

Default: 6

Required: No

Machine Snapshot max percent memory attribute

When the .NET Machine agent detects memory usage on the machine equals or exceeds the max percent memory value, it flags the sample as a violation. The minimum value is 20. The maximum value is 100.

Type: Integer

Default: 80

Required: No

Machine Snapshot max percent CPU attribute

When the .NET Machine agent detects CPU usage on the machine equals or exceeds the max percent cpu value, it flags the sample as a violation. The minimum value is 20. The maximum value is 100.

Type: Integer

Default: 80

Required: No

Machine Snapshot max queue item age attribute

When the .NET Machine agent detects the oldest item in the IIS queue equals or exceeds the max queue item age value in milliseconds, it flags the sample as a violation.

Type: Integer

Default: 100

Required: No

Machine Snapshot periodic collection attribute

The .NET Machine agent takes one snapshot per periodic collection time range. Specify the value in seconds. The minimum is 60 seconds.

Type: Integer

Default: 600

Required: No

CLR Crash Reporting Element

The clrcrash-reporting element is a child element of the machine-agent element. Use the clrcrash-reporting element to control whether or not the .NET Machine Agent reports CLR crash events to the Controller. See Monitor CLR Crashes

Optional Element: <clrcrash-reporting enabled="true"/>

CLR Crash Reporting enabled attribute

Set the clrcrash-reporting enabled attribute to false to stop reporting CLR Crash events to the controller.

Type: Boolean

Default: true

Required: No

Process Monitor Element

The process-monitor element is a child element of the machine-agent element. By default, the agent enables process monitoring for all IIS processes.

Optional Element: <process-monitor report-all-iis-processes="true"/>

Process Monitor report all IIS processes attribute

Set the report-all-iis-processes attribute to false to enable process monitoring only for instrumented IIS processes.

Type: Boolean

Default: true

Required: No

Metrics Element

The metrics element is a child element of the machine-agent element. By default, the machine agent registers a maximum of 200 metrics. Use the metrics element to increase the number of metrics the .NET Machine Agent can register. See Metrics Limits

Use caution when increasing the metric registration limits. Increasing the limit can increase the resource overhead for agents and Controller.

Optional Element: <metrics max-metrics="200"/>

Metrics max-metrics attribute

Specify the maximum number of metrics the .NET Machine Agent can register.

Type: Integer

Default: 200

Required: No

Perf-metrics Element

The perf-metrics element is a child element of the metrics element. By default, the machine agent collects and reports a full set of performance metrics. You can modify the priority level for the performance metrics to limit the metrics the agent collects and thereby decrease agent overhead. For a full list of metrics and their priorities, see Manage Windows Performance Metrics.

Optional Element: <perf-metrics priority-level="3">

Perf-metrics priority-level attribute

Specify the set of performance metrics for the machine agent to collect as follows:

  • 0 - disable metric collection.
  • 1 - collect only high priority metrics.
  • 2 - collect high and medium priority metrics.
  • 3 - collect all metrics: high, medium, and low priority.

Type: Integer in the range 0 - 3

Default: 3

Required: If you use the perf-metrics element.

Perf-metric Element

The perf-metric element is a child element of the perf-metrics element. If you set the perf-metric priority to 0 to disable general collection of performance metrics, you can use the perf-metric element to enable individual performance metrics. You cannot enable individual metrics with perf-metric priority greater than 0.

Optional Element: <perf-metric name="<metric_path>"/>

Perf-metric name attribute

Specify the full path of the performance metric. See the example below for the % Busy metric and the Errors Unhandled During Execution metric.

Type: String: metric path

Default: N/A

Required: If you use the perf-metric element.

Sample Machine Agent Configuration with Individual Performance Metrics

<machine-agent>
   <metrics>
	<!-- Disable collection of performance metrics in general. -->
     <perf-metrics priority-level="0">
       <!-- Enable collection of individual performance metrics. -->
       <perf-metric name="Hardware Resources|CPU|%Busy"/>
       <perf-metric name="ASP.NET Applications|Errors Unhandled During Execution"/>
     </perf-metrics>
   </metrics>
 </machine-agent>

Performance Counters Element

The perf-counters element is a child of the machine-agent element. It is a container for all performance counters.

Optional Element: <perf-counters>

Performance Counter element

The perf-counter element is a child of the perf-counters element. For a list of performance counters to enable, see Performance Counters in the .NET Framework.

Optional Element: <perf-counter cat="category" name="name" instance="instance"/>

Performance Counter cat attribute

The perf-counter cat attribute indicates the performance counter category.

Type: String

Default: None

Required: Category is required for the perf-counter element.

Performance Counter name attribute

The perf-counter name attribute indicates the performance counter name.

Type: String

Default: None

Required: Name is required for the perf-counter element.

Performance Counter instance attribute

The perf-counter instance attribute is the performance counter instance value.

Type: String

Default: None

Required: Instance is required for the perf-counter element.

Sample Machine Agent Configuration with Performance Counters

  <machine-agent>
    <!-- Additional machine level Performance Counters -->
    <perf-counters>
      <perf-counter cat="Network Interface" name="Bytes Sent" instance="Local Area Connection"/>
    </perf-counters>
  </machine-agent>

Instrumentation Element

The instrumentation element is a child of the machine-agent element. It allows you to enable additional .NET Agent instrumentors such as thread correlation or correlation for .NET remoting.

Optional Element: <instrumentation>

Instrumentor Element

Thee instrumentor element is a child of the instrumentation element. The instrumentor element specifies the .NET Agent instrumentor to implement.

Optional Element: <instrumentor name="instrumentor name" enabled="true"/>/>

Instrumentor name attribute

The instrumentor name attribute indicates the instrumentor name.

Type: String

Default: None

Required: Name is required for the Instrumentor element.

Instrumentor enabled attribute

Set the instrumentor enabled attribute to true to enable instrumentation.

Type: Boolean

Default: false

Required: No.

Note: The current configuration syntax is enabled="true". Versions prior to 3.7.8 used disabled="false".

Sample Machine Agent Configuration with Thread Correlation Instrumentors

 <machine-agent>
    <!--Enable thread correlation-->
    <instrumentation>
      <instrumentor name="ThreadCorrelationThreadPoolCLR2Instrumentor" enabled="true"/>
      <instrumentor name="ThreadStartCLR2Instrumentor" enabled="true"/>
      <instrumentor name="ThreadStartCLR4Instrumentor" enabled="true"/>
    </instrumentation>
  </machine-agent>

Additional .NET Agent Instrumentors