Class XmlAlertConfigurationParser
java.lang.Object
org.openspaces.admin.alert.config.parser.XmlAlertConfigurationParser
- All Implemented Interfaces:
AlertConfigurationParser
A simple XML alert configuration parser.
The alert configurations are read from an XML file. For example, the following alert.xml file specifies a CPU Utilization alert configuration, which is enabled, and has three configuration properties.
<alerts>
<alert
class="org.openspaces.admin.alert.config.CpuUtilizationAlertConfiguration"
enabled="true">
<property key="high-threshold-perc" value="80" />
<property key="low-threshold-perc" value="60" />
<property key="measurement-period-milliseconds" value="60000" />
</alert>
<alert ...>
...
</alert>
</alerts>
The alert XML configuration file can be located using a direct path to the file, or by reference to a resource located in the classpath. The default classpath config directory is "config/alerts/" and the default alert XML configuration file name is "alerts.xml".
- Since:
- 8.0
- Author:
- Moran Avigdor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_ALERT_CONFIG_DIRECTORY
default alert classpath relative configuration directory- See Also:
-
DEFAULT_ALERT_RESOURCE_NAME
default alert configuration file name- See Also:
-
-
Constructor Details
-
XmlAlertConfigurationParser
-
XmlAlertConfigurationParser
-
-
Method Details
-
parse
Description copied from interface:AlertConfigurationParserParse and return an array ofAlertConfiguration.BeanConfig.getProperties()- String key-value properties used to configure the alert.AlertConfiguration.isEnabled()- enable the configuration for this alert.BeanConfig.getBeanClassName()- the server-side alert trigger class name.
- Specified by:
parsein interfaceAlertConfigurationParser- Returns:
- a non-null array of
AlertConfigurations. - Throws:
AlertConfigurationParserException- if failed to parse.
-