Class AbstractAlertSampleManager
java.lang.Object
org.ametys.runtime.plugins.admin.jvmstatus.monitoring.sample.AbstractSampleManager
org.ametys.runtime.plugins.admin.jvmstatus.monitoring.alerts.AbstractAlertSampleManager
- All Implemented Interfaces:
PluginAware
,AlertSampleManager
,MonitoringConstants
,SampleManager
,Configurable
,LogEnabled
,ThreadSafe
- Direct Known Subclasses:
DiskSpaceSampleManager
,ThreadSampleManager
public abstract class AbstractAlertSampleManager
extends AbstractSampleManager
implements AlertSampleManager
AbstractAlertSampleManager gives you the infrastructure for easily
deploying an
AlertSampleManager
.
If the configuration mailBody is i18n, it can include two parameters :
the first one is the current value, the second one is the threshold value-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.runtime.plugins.admin.jvmstatus.monitoring.alerts.AlertSampleManager
AlertSampleManager.Threshold
Nested classes/interfaces inherited from interface org.ametys.runtime.plugins.admin.jvmstatus.monitoring.MonitoringConstants
MonitoringConstants.Period
-
Field Summary
Modifier and TypeFieldDescriptionprotected I18nizableText
The body of the mailprotected I18nizableText
The subject of the mailFields inherited from class org.ametys.runtime.plugins.admin.jvmstatus.monitoring.sample.AbstractSampleManager
_description, _featureName, _id, _label, _logger, _pluginName
Fields inherited from interface org.ametys.runtime.plugins.admin.jvmstatus.monitoring.MonitoringConstants
FEEDING_PERIOD, RRD_EXT, RRD_STORAGE_DIRECTORY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) protected abstract Map<String,
AlertSampleManager.Threshold.Operator> Provides the kind of operator for triggering the alert for each datasource an alert is attached to.Provides the configuration names for each datasource an alert is attached to.Provides the threshold for each datasource.Methods inherited from class org.ametys.runtime.plugins.admin.jvmstatus.monitoring.sample.AbstractSampleManager
_configureDatasources, _configureValueRange, _getGraphTitle, _internalCollect, _registerDatasources, _setCommonParameters, collect, configureRRDDef, enableLogging, getDescription, getId, getLabel, setPluginInfo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.runtime.plugins.admin.jvmstatus.monitoring.SampleManager
collect, configureRRDDef, getDescription, getId, getLabel
-
Field Details
-
_subject
The subject of the mail -
_body
The body of the mail
-
-
Constructor Details
-
AbstractAlertSampleManager
public AbstractAlertSampleManager()
-
-
Method Details
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classAbstractSampleManager
- Throws:
ConfigurationException
-
getThresholdValues
Description copied from interface:AlertSampleManager
Provides the threshold for each datasource.- Specified by:
getThresholdValues
in interfaceAlertSampleManager
- Returns:
- the threshold for each datasource. The key of the map is the datasource name for which you want to create an alert.
-
getThresholdConfigNames
Provides the configuration names for each datasource an alert is attached to. This method must return a map with the same keys asgetOperators()
- Returns:
- the configuration names for each datasource an alert is attached to.
-
getOperators
Provides the kind of operator for triggering the alert for each datasource an alert is attached to. This method must return a map with the same keys asgetThresholdConfigNames()
- Returns:
- the kind of operator for triggering the alert for each datasource an alert is attached to.
-