197 |
|
String currentValue = String.valueOf(timeSinceLastHB); |
198 |
|
String attributeName = "Heartbeat"; |
199 |
|
String thresholdValue = String.valueOf(reg.getThreshold(thresholdLevel)); |
200 |
< |
String time = Long.toString(reg.getAlertTimeout(reg.getLastAlertLevel(0), 0) / 1000); |
200 |
> |
String timeout = Long.toString(reg.getAlertTimeout(reg.getLastAlertLevel(0), 0) / 1000); |
201 |
|
if (thresholdLevel == Alert.thresholdNORMAL) { |
202 |
|
thresholdValue = "-"; |
203 |
|
} |
204 |
|
if (alertLevel == Alert.alertOK) { |
205 |
< |
time = "0"; |
205 |
> |
timeout = "0"; |
206 |
|
} |
207 |
< |
Alert alert = new Alert(alertLevel, lastAlert, thresholdLevel, source, thresholdValue, currentValue, attributeName, time); |
207 |
> |
Alert alert = new Alert(alertLevel, lastAlert, thresholdLevel, source, thresholdValue, currentValue, attributeName, timeout, reg.getInitialAlertTime(0)); |
208 |
|
_alerterQueue.add(alert); |
209 |
< |
_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"); |
209 |
> |
_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"); |
210 |
|
} |
211 |
|
|
212 |
|
//---ACCESSOR/MUTATOR METHODS--- |