org.opennms.netmgt.xml.event.Event.getDistPoller()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(160)

本文整理了Java中org.opennms.netmgt.xml.event.Event.getDistPoller()方法的一些代码示例,展示了Event.getDistPoller()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getDistPoller()方法的具体详情如下:
包路径:org.opennms.netmgt.xml.event.Event
类名称:Event
方法名:getDistPoller

Event.getDistPoller介绍

[英]Returns the value of field 'distPoller'.
[中]返回字段“distPoller”的值。

代码示例

代码示例来源:origin: OpenNMS/opennms

@Override
  public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
    return event.getDistPoller();
  }
},

代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon

@Override
  public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
    return event.getDistPoller();
  }
},

代码示例来源:origin: OpenNMS/opennms

if (paramMap.containsKey("location")) {
  effectiveLocation = paramMap.get("location");
} else if (event.getDistPoller() != null) {
  final OnmsMonitoringSystem monitoringSystem = monitoringSystemDao.get(event.getDistPoller());
  if (monitoringSystem != null) {
    effectiveLocation = monitoringSystem.getLocation();
  } else {
    LOG.info("newSuspect event references monitoring system with id {}, but this system was not found. Using the default location.",
        event.getDistPoller());

代码示例来源:origin: org.opennms/opennms-provisiond

if (paramMap.containsKey("location")) {
  effectiveLocation = paramMap.get("location");
} else if (event.getDistPoller() != null) {
  final OnmsMonitoringSystem monitoringSystem = monitoringSystemDao.get(event.getDistPoller());
  if (monitoringSystem != null) {
    effectiveLocation = monitoringSystem.getLocation();
  } else {
    LOG.info("newSuspect event references monitoring system with id {}, but this system was not found. Using the default location.",
        event.getDistPoller());

代码示例来源:origin: OpenNMS/opennms

@Override
public void handleMessage(TrapLogDTO messageLog) {
  try (Logging.MDCCloseable mdc = Logging.withPrefixCloseable(Trapd.LOG4J_CATEGORY)) {
    final Log eventLog = toLog(messageLog);
    eventForwarder.sendNowSync(eventLog);
    // If configured, also send events for new suspects
    if (config.getNewSuspectOnTrap()) {
      eventLog.getEvents().getEventCollection().stream()
          .filter(e -> !e.hasNodeid())
          .forEach(e -> {
            sendNewSuspectEvent(e.getInterface(), e.getDistPoller());
            LOG.debug("Sent newSuspectEvent for interface {}", e.getInterface());
          });
    }
  }
}

代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.traps

@Override
public void handleMessage(TrapLogDTO messageLog) {
  try (Logging.MDCCloseable mdc = Logging.withPrefixCloseable(Trapd.LOG4J_CATEGORY)) {
    final Log eventLog = toLog(messageLog);
    eventForwarder.sendNowSync(eventLog);
    // If configured, also send events for new suspects
    if (config.getNewSuspectOnTrap()) {
      eventLog.getEvents().getEventCollection().stream()
          .filter(e -> !e.hasNodeid())
          .forEach(e -> {
            sendNewSuspectEvent(e.getInterface(), e.getDistPoller());
            LOG.debug("Sent newSuspectEvent for interface {}", e.getInterface());
          });
    }
  }
}

代码示例来源:origin: OpenNMS/opennms

.forEach(e -> {
  LOG.trace("Syslogd: Found a new suspect {}", e.getInterface());
  sendNewSuspectEvent(localAddr, e.getInterface(), e.getDistPoller());
});

代码示例来源:origin: OpenNMS/opennms

b.append(" Descr: " + event.getDescr() + "\n");
if (event.getDistPoller() != null) {
  b.append(" DistPoller: " + event.getDistPoller() + "\n");

代码示例来源:origin: OpenNMS/opennms

e.getInterface(),
getServiceID(e.getService()),
e.getDistPoller() == null ? "00000000-0000-0000-0000-000000000000" : e.getDistPoller(),
"Y",
"Y",

代码示例来源:origin: org.opennms.core.test-api/org.opennms.core.test-api.db

e.getInterface(),
getServiceID(e.getService()),
e.getDistPoller() == null ? "00000000-0000-0000-0000-000000000000" : e.getDistPoller(),
"Y",
"Y",

代码示例来源:origin: OpenNMS/opennms

else
    snmpTrapHelper.addVarBinding(trap, ".1.3.6.1.4.1.5813.20.1.1.0", "OctetString", "text", "null");
if (event.getDistPoller() != null)
    snmpTrapHelper.addVarBinding(trap, ".1.3.6.1.4.1.5813.20.1.2.0", "OctetString", "text", event.getDistPoller());
else
    snmpTrapHelper.addVarBinding(trap, ".1.3.6.1.4.1.5813.20.1.2.0", "OctetString", "text", "null");

代码示例来源:origin: OpenNMS/opennms

if (ovent.getDistPoller() == null && event.getDistPoller() != null && !"".equals(event.getDistPoller().trim())) {
  ovent.setDistPoller(monitoringSystemDao.get(event.getDistPoller()));

代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon

if (ovent.getDistPoller() == null && event.getDistPoller() != null && !"".equals(event.getDistPoller().trim())) {
  ovent.setDistPoller(monitoringSystemDao.get(event.getDistPoller()));

代码示例来源:origin: OpenNMS/opennms

oe.setEventDescr(event.getDescr());
try {
  oe.setDistPoller(m_distPollerDao.get(event.getDistPoller()));
} catch (final DataAccessException e) {
  throw new EventProcessorException(e);

代码示例来源:origin: org.opennms/opennms-dao-mock

oe.setEventDescr(event.getDescr());
try {
  oe.setDistPoller(m_distPollerDao.get(event.getDistPoller()));
} catch (final DataAccessException e) {
  throw new EventProcessorException(e);

相关文章