140 |
|
String currentValue = packet.getParam(_attributes[attributeNum]); |
141 |
|
String attributeName = _attributeNames[attributeNum]; |
142 |
|
String thresholdValue = Double.toString(reg.getThreshold(thresholdLevel)); |
143 |
< |
String time = Long.toString(reg.getAlertTimeout(reg.getLastAlertLevel(attributeNum), attributeNum) / 1000); |
143 |
> |
String timeout = Long.toString(reg.getAlertTimeout(reg.getLastAlertLevel(attributeNum), attributeNum) / 1000); |
144 |
|
if (thresholdLevel == Alert.thresholdNORMAL) { |
145 |
|
thresholdValue = "-"; |
146 |
|
} |
147 |
|
if (alertLevel == Alert.alertOK) { |
148 |
< |
time = "0"; |
148 |
> |
timeout = "0"; |
149 |
|
} |
150 |
< |
Alert alert = new Alert(alertLevel, lastAlert, thresholdLevel, source, thresholdValue, currentValue, attributeName, time); |
150 |
> |
Alert alert = new Alert(alertLevel, lastAlert, thresholdLevel, source, thresholdValue, currentValue, attributeName, timeout, reg.getInitialAlertTime(attributeNum)); |
151 |
|
_alerterQueue.add(alert); |
152 |
< |
_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"); |
152 |
> |
_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"); |
153 |
|
} |
154 |
|
|
155 |
|
//---ACCESSOR/MUTATOR METHODS--- |