Description: Rules displayed in grey are not available in the monitored JVM. By default, all rules are deactivated. To activate a rule, select the check box next to it.

Go to primary content

| Previous | Next |

# Working with Trigger Rules

Rules displayed in grey are not available in the monitored JVM. By default, all rules are deactivated. To activate a rule, select the check box next to it.

To add a new trigger rule:

1. Click Add on the Trigger Rules panel.
2. At the first step of the Add New Rule Wizard, select the attribute on which the rule should trigger. Click Next.
3. Set the condition on which the rule should trigger. This step contains the following settings:

   - Max trigger value (for numeric attributes) or Match string (for non-numeric attributes): Specify the maximum value or the matching string for the selected attribute for which the rule should trigger.

   - Sustained time: Specify the duration (in seconds) for which the condition must stay true before the rule is triggered.

   - Limit period: Specify the minimum amount of time (in seconds) that should pass before the rule can be triggered subsequently.

   - Trigger when condition is met: Select whether to trigger the rule when the condition is met. For example, if the trigger value is set to 100, the rule will be triggered when the value changes from less than 100 to 100 or more.

   - Trigger when recovering from condition: Select whether to trigger the rule when the condition is no longer met. For example, if the trigger value is set to 100, the rule will be triggered when the value changes from 100 or more to less than 100.

   Click Next.

4. Select the action you want to occur when the rule triggers. Depending on the action, you may have to provide additional data. The following actions are available:

   - Application Alert: Displays an alert dialog in JDK Mission Control.

   - Console Output: Sends a notification to the standard output (stdout) of the console (command prompt) from which the JMX Console was started.

   - Dump Flight Recording: Dumps whatever data is available in a flight recording for the last specified time period (in seconds) to a JFR file.

   - HPROF Dump: Initiates a memory dump to the specified HPROF file.

   - Invoke Diagnostic Command: Invokes the specified diagnostic command and logs output to the specified log file by appending or overwriting the results.

   - Log to file: Writes a notification to the specified log file.

   - Send Email: Sends a notification by email. You can configure the SMTP server address and port, the recipients and sender for the email, and provide SSL credentials if secure connection is necessary.

   - Start Continuous Flight Recording: Starts a continuous flight recording.

   - Start Time Limited Flight Recording: Starts a flight recording that will dump the results to a JFR file after the specified time period (in seconds).

   Click Next to continue, or Finish to add the rule as it is.

5. (Optional) Select the time constraints if you want the rule to be active only on specific dates, days of the week, or time of day. Click Next.
6. (Optional) Select the group to which the rule should belong to or specify a new group. Specify the name for the rule and a detailed description.

   You can go back to any previous step in the wizard to modify any of the settings. Click Finish to add the rule to the list.

To edit a rule, select it in the Trigger Rules panel. The Rule Details panel to the right displays three subtabs with the attribute and value on which the rule should trigger, action that is triggered by the rule, and time constraints for when you want the rule to be active.

To rename a rule, select it in the Trigger Rules panel and click Rename. Then provide a new name for the rule and click OK.

If you do not want the rule to trigger, you can deactivate it by deselecting the check box near the rule in the Trigger Rules panel. However, if you are sure you will never use the rule again, you can remove it from the list completely by selecting it and clicking Delete.

To export a set of rules to an XML file, click Export in the Trigger Rules panel. Then select the rules you want to export, specify the file name, and click OK. To import a set of rules from an XML file, click Import in the Trigger Rules panel, select the file and click OK.

To reset back to the default set of rules, click Reset in the Trigger Rules panel and confirm. This will overwrite all the rules and replace them with the default set.

Copyright © 2018, 2022, Oracle and/or its affiliates. All rights reserved. | Previous | Next |