Class RRDsFeederTimerTask
- java.lang.Object
-
- java.util.TimerTask
-
- org.ametys.runtime.plugins.admin.jvmstatus.monitoring.RRDsFeederTimerTask
-
- All Implemented Interfaces:
Runnable
,MonitoringConstants
,Disposable
,Initializable
,Component
,LogEnabled
,Serviceable
public class RRDsFeederTimerTask extends TimerTask implements Component, LogEnabled, Serviceable, Initializable, Disposable, MonitoringConstants
TimerTask
for creating and feeding RRDs files in order to produce graphs for monitoring:- JVM uptime
- JVM memory status
- JVM thread count
- Servlet Engine request count
- Servlet Engine session count
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.runtime.plugins.admin.jvmstatus.monitoring.MonitoringConstants
MonitoringConstants.Period
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__CONFIG_ADMIN_MAIL
private static String
__CONFIG_ALERTS_ENABLED
private static String
__CONFIG_FROM_MAIL
private Map<String,Map<String,Boolean>>
_currentAlerts
Tells if there is a current alert, i.e.private I18nUtils
_i18nUtils
private Logger
_logger
private MonitoringExtensionPoint
_monitoringExtensionPoint
private String
_rrdStoragePath
private Timer
_timer
-
Fields inherited from interface org.ametys.runtime.plugins.admin.jvmstatus.monitoring.MonitoringConstants
FEEDING_PERIOD, RRD_EXT, RRD_STORAGE_DIRECTORY
-
-
Constructor Summary
Constructors Constructor Description RRDsFeederTimerTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
_checkIfAlert(AlertSampleManager sampleManager, Map<String,Object> collectedValues)
private void
_sendAlertMail(I18nizableText subject, I18nizableText body, String currentValue, String thresholdValue)
void
dispose()
void
enableLogging(Logger logger)
void
initialize()
void
run()
void
service(ServiceManager manager)
-
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
-
-
-
Field Detail
-
__CONFIG_ALERTS_ENABLED
private static final String __CONFIG_ALERTS_ENABLED
- See Also:
- Constant Field Values
-
__CONFIG_FROM_MAIL
private static final String __CONFIG_FROM_MAIL
- See Also:
- Constant Field Values
-
__CONFIG_ADMIN_MAIL
private static final String __CONFIG_ADMIN_MAIL
- See Also:
- Constant Field Values
-
_monitoringExtensionPoint
private MonitoringExtensionPoint _monitoringExtensionPoint
-
_rrdStoragePath
private String _rrdStoragePath
-
_i18nUtils
private I18nUtils _i18nUtils
-
-
Constructor Detail
-
RRDsFeederTimerTask
public RRDsFeederTimerTask()
-
-
Method Detail
-
enableLogging
public void enableLogging(Logger logger)
- Specified by:
enableLogging
in interfaceLogEnabled
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
_checkIfAlert
private void _checkIfAlert(AlertSampleManager sampleManager, Map<String,Object> collectedValues)
-
_sendAlertMail
private void _sendAlertMail(I18nizableText subject, I18nizableText body, String currentValue, String thresholdValue)
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceDisposable
-
-