--- projects/cms/source/server/uk/org/iscream/cms/server/client/monitors/Heartbeat__Monitor.java 2001/03/05 23:49:51 1.4 +++ projects/cms/source/server/uk/org/iscream/cms/server/client/monitors/Heartbeat__Monitor.java 2001/03/06 02:33:55 1.5 @@ -12,8 +12,8 @@ import uk.ac.ukc.iscream.componentmanager.*; /** * This Monitor watches heartbeats * - * @author $Author: tdb $ - * @version $Id: Heartbeat__Monitor.java,v 1.4 2001/03/05 23:49:51 tdb Exp $ + * @author $Author: ajm $ + * @version $Id: Heartbeat__Monitor.java,v 1.5 2001/03/06 02:33:55 ajm Exp $ */ public class Heartbeat__Monitor implements PluginMonitor, Runnable { @@ -22,7 +22,7 @@ public class Heartbeat__Monitor implements PluginMonit /** * The current CVS revision of this class */ - public final String REVISION = "$Revision: 1.4 $"; + public final String REVISION = "$Revision: 1.5 $"; public final String DESC = "Monitors Heartbeats."; @@ -197,16 +197,16 @@ public class Heartbeat__Monitor implements PluginMonit String currentValue = String.valueOf(timeSinceLastHB); String attributeName = "Heartbeat"; String thresholdValue = String.valueOf(reg.getThreshold(thresholdLevel)); - String time = Long.toString(reg.getAlertTimeout(reg.getLastAlertLevel(0), 0) / 1000); + String timeout = Long.toString(reg.getAlertTimeout(reg.getLastAlertLevel(0), 0) / 1000); if (thresholdLevel == Alert.thresholdNORMAL) { thresholdValue = "-"; } if (alertLevel == Alert.alertOK) { - time = "0"; + timeout = "0"; } - Alert alert = new Alert(alertLevel, lastAlert, thresholdLevel, source, thresholdValue, currentValue, attributeName, time); + Alert alert = new Alert(alertLevel, lastAlert, thresholdLevel, source, thresholdValue, currentValue, attributeName, timeout, reg.getInitialAlertTime(0)); _alerterQueue.add(alert); - _logger.write(toString(), Logger.DEBUG, "Fired alert for source:" + source + " at alert level:" + Alert.alertLevels[alertLevel] + " on:" + attributeName + " for threshold level:" + Alert.thresholdLevels[thresholdLevel] + " at:" + currentValue + " exceeding threshold of:" +thresholdValue + " next alert sent in:" + time + "secs"); + _logger.write(toString(), Logger.DEBUG, "Fired alert for source:" + source + " at alert level:" + Alert.alertLevels[alertLevel] + " on:" + attributeName + " for threshold level:" + Alert.thresholdLevels[thresholdLevel] + " at:" + currentValue + " exceeding threshold of:" +thresholdValue + " next alert sent in:" + timeout + "secs"); } //---ACCESSOR/MUTATOR METHODS---