Perform Java Action
This action will perform Java actions such as generating thread dump, heap dump, garbage collection, or collecting APM Insight thread profiles in the event of an alarm. To create a Java action, follow the steps given below:
- Select the Java Heap Dump/Thread Dump/GC/APMInsight Thread Profiling option from the Actions menu.
- Enter the Display Name of the action.
- Choose the Action Type to be performed in the event of an alarm. You can choose Thread Dump, Heap Dump, Perform GC, or APM Insight Thread Profile.
- If you choose the Thread Dump option, specify the Number of thread dumps to be performed and the Delay between thread dumps in seconds.
- If you choose the Heap Dump option, specify the Number of heap dumps to be performed and the Delay between heap dumps in seconds.
- If you choose the Perform GC option, specify the Number of GCs to be performed and the Delay between GCs in seconds.
- If you choose the APM Insight Thread Profile option:
- Specify the Profiling Duration (minutes) - the duration for which thread profiles will be collected. Allowed range: 5 to 60 minutes.
- Specify the Top N Threads by Resource Utilization - the number of top threads to capture. Allowed range: 5 to 20.
- The Profiling Target is fixed as Monitor that triggers the alarm. Applications Manager will automatically detect and trigger Thread Profile for the APM Insight Application/Instance associated with the alarm.
Note: If this action is configured for an APM Insight Application monitor, profiling will be triggered for all instances within it.
Prerequisite: APM Insight Java/.NET Application monitors must already be configured for this action to execute.
- Select the email action to be associated with this Java action using Associate Email Action. You can either select an existing email action from the drop-down box or create a new email action by clicking the New Action link.
- For the APM Insight Thread Profile action type, a notification email is automatically sent after the action executes, with a link to view the collected profiles under the APM Insight → Thread Profile tab.
- For action types other than APM Insight Thread Profile, select the Target JRE from the drop-down box. The available options include Auto-select JRE, All JREs in the selected monitor group, Specific host, and Specific JRE.
- If you select Auto-select JRE, Applications Manager will automatically detect and trigger Java actions based on the associated monitor. For example, if the action is associated with a host, this will trigger thread dump for the JREs available in the host. Or if the action is associated with a Tomcat/JRE monitor, this will trigger thread dump for the JREs present in the host of Tomcat server or JRE.
- If you select All JREs in the selected monitor group, this will trigger java actions for all the JREs present in that monitor group.
- If you select Specific host option, this will trigger java actions for all the JREs present in the selected host.
- Selecting a Specific JRE will trigger java actions for that JRE.
- If you want to execute the action during specific time periods, enable the Execute Action based on Business Hours option and select the Business Hour during which the action has to be executed. The action can be configured such that it is executed during or outside the selected Business Hours. Use the drop-down menu to select your time window or click on 'Add New Business Hour' to create a new time window.
- Click the Create Action button to finish creating the Java action.
After creating the Java action other than APM Insight Thread Profile action, you can test its execution by clicking the Execute icon
of that action.
APM Insight Thread Profile - Additional Notes
1-Hour Cooldown: Once an APM Insight Thread Profile action is triggered, a new Thread Profile collection will not be initiated again until 1 hour has elapsed - regardless of how many times the action fires within that window. A notification email with a link to the already-collected profiles will still be sent for any alarm triggered during this cooldown period.
Viewing Thread Profiles: Collected profiles can be viewed under the APM Insight → Thread Profile tab of the associated APM Insight Java/.NET Application Monitor.
Limitations:
- Only “Monitor that triggers the alarm” targeting is supported. Targeting a specific host or JRE is not available for this action type.
- Associating this action with multiple attributes may lead to performance issues.