Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
on 01-07-2025 11:38 AM - edited on 01-07-2025 11:39 AM by Ryan.Paredez
Contents:
The AppDynamics.Agent.Coordinator is the orchestration on when to inject the app agent's DLLs into an application as well as collecting machine metrics (CPU, Memory, Performance Counters, etc). The Coordinator does not monitor any application on the server has this is the responsibility of the app agent.
In an environment where the profiler environment variables are defined, any .NET runtime at startup will check if the application should be profiled and what profiler to inject. As part of the installation process of the MSI package, it will create the necessary profiler environment variables.
Profiler environment variables:
If the .NET application is a full framework, it will write a message to the Event Viewer's Application logs. Sample of a successful instrumentation:
.NET Runtime version 4.0.30319.0 - The profiler was loaded successfully. Profiler CLSID: 'AppDynamics.AgentProfiler'. Process ID (decimal): 110060. Message ID: [0x2507].
.NET Runtime version 4.0.30319.0 - The profiler has requested that the CLR instance not load the profiler into this process. Profiler CLSID: 'AppDynamics.AgentProfiler'. Process ID (decimal): 111500. Message ID: [0x2516].
The AppDynamics.Agent.Coordinator reports to the controller and one of the metrics it reports is [Availability]. This metric represents the Machine Agent status on the Controller's Tiers & Nodes page.
The App Agent status is the app agent that is injected into your application. If your application is not running then neither is the app agent. This leads us to the next point regarding IIS applications.
The app agent is injected into your application and shares the application's lifecycle. For IIS, this means the app agent's DLLs are injected into the w3wp process on .NET startup. This can only happen at the startup of the process.
However, app pools are managed by IIS, and the default settings do the following:
As mentioned earlier, the app agent shares the application's lifecycle, so you can see how these default settings might affect the app agent status that is displayed on the controller.
Two possible scenarios with the default IIS settings can cause the app agent status to show 0%.
Three settings must be changed to ensure that the app pool is running and remains running regardless of traffic or server restart.
The Idle Timeout property is responsible for terminating an app pool that has not received traffic after some time (default is 20 minutes). Setting this property to 0 will prevent IIS from terminating the app pool regardless of how long the app pool is idle.
Start Mode set to AlwaysRunning instead of the default value of OnDemand.
IIS Application Initialization requires IIS 8.0. When the server starts, IIS will invoke a fake request to the specified page to start the app pool. Follow the instructions listed in the link above for the detailed steps.
You can modify the config.xml to monitor the performance counter "Current Application Pool State" which is part of the APP_POOL_WAS category for your particular app pool and create a health rule to trigger in the event that the app pool is in a stopped state.
"Current Application Pool State" possible values:
However, you need to be aware of the following:
I strongly recommend modifying the IIS settings to get a true app agent status and then rely on the "Current Application Pool State" performance counter but this option is available if your circumstances prevent modification of the IIS settings and the limitations above are not a concern.
With the caveats out of the way, let's discuss how to make this change.
Config.xml:
<machine-agent>
<perf-counters>
<perf-counter cat="APP_POOL_WAS" name="Current Application Pool State" instance="MY_APP_POOL_NAME" />
</perf-counters>
</machine-agent>
Then create a new health to trigger if the app pool state is not in a Started state.
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form