本文整理了Java中org.opennms.netmgt.xml.event.Event.getSnmphost()
方法的一些代码示例,展示了Event.getSnmphost()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getSnmphost()
方法的具体详情如下:
包路径:org.opennms.netmgt.xml.event.Event
类名称:Event
方法名:getSnmphost
[英]Returns the value of field 'snmphost'. The field 'snmphost' has the following description: The snmp host of the trap
[中]返回字段“snmphost”的值。字段“snmphost”具有以下描述:陷阱的snmp主机
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
return event.getSnmphost();
}
},
代码示例来源:origin: OpenNMS/opennms
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
return event.getSnmphost();
}
},
代码示例来源:origin: OpenNMS/opennms
return new EventField(name) { public String get(Event event) { return event.getSnmphost(); } };
} else if (name.equals(TAG_SERVICE)) {
代码示例来源:origin: OpenNMS/opennms
retParmVal = event.getInterface();
} else if (mename.equals(TAG_SNMPHOST)) {
retParmVal = event.getSnmphost();
} else if (mename.equals(TAG_SERVICE)) {
retParmVal = event.getService();
代码示例来源:origin: OpenNMS/opennms
b.append(" Snmp: " + toString(event.getSnmp()) + "\n");
if (event.getSnmphost() != null) {
b.append(" Snmphost: " + event.getSnmphost() + "\n");
代码示例来源:origin: OpenNMS/opennms
else
snmpTrapHelper.addVarBinding(trap, ".1.3.6.1.4.1.5813.20.1.11.0", "OctetString", "text", "null");
if (event.getSnmphost() != null)
snmpTrapHelper.addVarBinding(trap, ".1.3.6.1.4.1.5813.20.1.12.0", "OctetString", "text", event.getSnmphost());
else
snmpTrapHelper.addVarBinding(trap, ".1.3.6.1.4.1.5813.20.1.12.0", "OctetString", "text", "null");
代码示例来源:origin: OpenNMS/opennms
ovent.setEventSnmpHost(EventDatabaseConstants.format(event.getSnmphost(), EVENT_SNMPHOST_FIELD_SIZE));
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
ovent.setEventSnmpHost(EventDatabaseConstants.format(event.getSnmphost(), EVENT_SNMPHOST_FIELD_SIZE));
代码示例来源:origin: OpenNMS/opennms
addVarBinding(packet, SNMP_TRAP_ADDRESS_OID, EventConstants.TYPE_SNMP_IPADDRESS, event.getSnmphost());
代码示例来源:origin: OpenNMS/opennms
oe.setEventSnmpHost(EventDatabaseConstants.format(event.getSnmphost(), EVENT_SNMPHOST_FIELD_SIZE));
oe.setEventSource(event.getSource());
oe.setEventTime(event.getTime());
代码示例来源:origin: org.opennms/opennms-dao-mock
oe.setEventSnmpHost(EventDatabaseConstants.format(event.getSnmphost(), EVENT_SNMPHOST_FIELD_SIZE));
oe.setEventSource(event.getSource());
oe.setEventTime(event.getTime());
代码示例来源:origin: OpenNMS/opennms
agentAddress = InetAddressUtils.addr(event.getSnmphost());
if (agentAddress == null) {
throw new SnmpTrapHelperException("Invalid ip address.");
内容来源于网络,如有侵权,请联系作者删除!