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 anAlertSampleManager
. 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
Fields Modifier and Type Field Description protected I18nizableText
_body
The body of the mailprotected I18nizableText
_subject
The subject of the mail-
Fields 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
Constructors Constructor Description AbstractAlertSampleManager()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration configuration)
protected abstract Map<String,AlertSampleManager.Threshold.Operator>
getOperators()
Provides the kind of operator for triggering the alert for each datasource an alert is attached to.protected abstract Map<String,String>
getThresholdConfigNames()
Provides the configuration names for each datasource an alert is attached to.Map<String,AlertSampleManager.Threshold>
getThresholdValues()
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 Detail
-
_subject
protected I18nizableText _subject
The subject of the mail
-
_body
protected I18nizableText _body
The body of the mail
-
-
Constructor Detail
-
AbstractAlertSampleManager
public AbstractAlertSampleManager()
-
-
Method Detail
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classAbstractSampleManager
- Throws:
ConfigurationException
-
getThresholdValues
public Map<String,AlertSampleManager.Threshold> 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
protected abstract Map<String,String> 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
protected abstract Map<String,AlertSampleManager.Threshold.Operator> 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.
-
-