EventSeverity severity = EventSeverity.INFO;
Vector<VariableBinding> vbs = pdu.getVariableBindings();
for (VariableBinding vb : vbs) {
OID oid = vb.getOid();
Variable var = vb.getVariable();
int syntax = vb.getSyntax();
// Try to translate the oid string (1.2.3....) into a readable name
String oids = oid.toString();
if (translation.getProperty(oids) != null) {
oids = translation.getProperty(oids);
}
payload.append(oids);
payload.append(": ");
payload.append(var.toString()); // TODO change depending on syntax !
payload.append("\n");
/*
* This corresponds with the values from AlertPriority
*/
if (severityOid != null && oid.compareTo(severityOid) == 0) {
String sev = var.toString();
if (sev.toLowerCase().contains("high"))
severity = EventSeverity.ERROR;
else if (sev.toLowerCase().contains("medium"))
severity = EventSeverity.WARN;
else