This page describes how to monitor CLRs with the .NET Machine Agent. The AppDynamics .NET Agent includes the .NET Machine Agent that runs as part of the AppDynamics.Agent.Coordinator service. The .NET Machine Agent regularly gathers CLR performance data and reports it back to the Controller.

CLR Events

The .NET Machine Agent monitors for CLR shutdown and restart events:

  • The agent reports an App Server Restart event and indicates if the restart was graceful or not.
  • For non-graceful shutdown, the agent reports a CLR Crash if it detects one.

The default exit code for a graceful shutdown is "0". If your Windows service or standalone application uses a different exit code, see "Profiler - Successful Exit Code Element" on .NET Agent Configuration Properties.

CLR Metrics

CLR metrics provide insight into how the .NET runtime is performing. The AppDynamics preconfigured CLR metrics include:

  • .NET CLR memory usage
  • Total classes loaded and how many are currently loaded
  • Garbage collection time spent, and detailed metrics about GC memory pools and caching
  • Locks and thread usage
  • Memory heap and non-heap usage, including the large object heap
  • Percent CPU process usage

CLR Health Alerts 

You can set up health rules based on infrastructure metrics. Once you have a health rule, you can create specific policies based on health rule violations. One type of response to a health rule violation is an alert.

In addition to the default metrics, you may be interested in additional metrics. You can specify additional performance counters to be reported by the .NET Machine Agent. See Manage Windows Performance Metrics.