Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 7. Configuration of an evaluation period for custom MBean triggers
The Cryostat agent supports smart triggers that continually listen to the current values of the specified MBean counters that you can define in custom trigger definitions. The trigger conditions are evaluated on a polling basis at regular configurable intervals. By default, trigger conditions are evaluated at regular 1-second intervals.
An evaluation period (polling frequency) of once per second means that there is a potential time delay of up to one second between a condition being met and the agent’s ability to evaluate that this condition was met.
When you configure your target application to load the Cryostat agent, you can choose to configure a different evaluation period for MBean custom triggers. You can specify the value of the evaluation period in milliseconds.
You can configure an evaluation period in either of the following ways:
- Using a JVM system property flag
The following example shows how to configure an evaluation period by using a JVM system property flag:
-Dcryostat.agent.smart-trigger.evaluation.period-ms=500
- Using an environment variable
The following example shows how to configure a harvester period by using an environment variable:
- name: CRYOSTAT_AGENT_SMART-TRIGGER_EVALUATION_PERIOD_MS value: 500
The preceding examples show an evaluation period value of 500. Based on this example, the trigger conditions are evaluated every 500 milliseconds (that is, at regular half-second intervals).