Class CpuUtilizationAlertConfigurer
java.lang.Object
org.openspaces.admin.alert.config.CpuUtilizationAlertConfigurer
- All Implemented Interfaces:
AlertConfigurer,BeanConfigurer<AlertConfiguration>
A CPU utilization alert configurer. Specifies the thresholds for triggering an alert. There are
two thresholds, high and low and a measurement period indicating a window for the CPU reading.
The CPU alert is raised if any discovered machine is above the specified CPU threshold for a
period of time. The CPU alert is resolved if its CPU goes below the specified CPU threshold for a
period of time.
Use the call to create() to create a fully initialized CpuUtilizationAlertConfiguration configuration.
- Since:
- 8.0
- Author:
- Moran Avigdor
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty machine CPU utilization alert configuration. -
Method Summary
Modifier and TypeMethodDescriptioncreate()Get a fully configured machine CPU utilization configuration (after all properties have been set).enable(boolean enabled) Enable an alert using this configuration.measurementPeriod(long period, TimeUnit timeUnit) Set the period of time a CPU alert should be triggered if it's reading is above/below the threshold setting.raiseAlertIfCpuAbove(int highThreshold) Raise an alert if the CPU reading is above the specified threshold for a period of time.resolveAlertIfCpuBelow(int lowThreshold) Resolve the previously raised alert if CPU is below the specified threshold for a period of time.
-
Constructor Details
-
CpuUtilizationAlertConfigurer
public CpuUtilizationAlertConfigurer()Constructs an empty machine CPU utilization alert configuration.
-
-
Method Details
-
enable
Description copied from interface:AlertConfigurerEnable an alert using this configuration. By default an alert is disabled.- Specified by:
enablein interfaceAlertConfigurer- Parameters:
enabled-trueto enable the alert using this configuration;falseto disable the alert.- Returns:
- this.
- See Also:
-
raiseAlertIfCpuAbove
Raise an alert if the CPU reading is above the specified threshold for a period of time. The period of time is configured usingmeasurementPeriod(long, TimeUnit).- Parameters:
highThreshold- high threshold percentage.- Returns:
- this.
- See Also:
-
resolveAlertIfCpuBelow
Resolve the previously raised alert if CPU is below the specified threshold for a period of time. The period of time is configured usingmeasurementPeriod(long, TimeUnit).- Parameters:
lowThreshold- low threshold percentage.- Returns:
- this.
- See Also:
-
measurementPeriod
Set the period of time a CPU alert should be triggered if it's reading is above/below the threshold setting.- Parameters:
period- period of time.timeUnit- the time unit of the specified period.- Returns:
- this.
-
create
Get a fully configured machine CPU utilization configuration (after all properties have been set).- Specified by:
createin interfaceBeanConfigurer<AlertConfiguration>- Returns:
- a fully configured alert bean configuration.
-