configureAgentVersion(agentConfig); Map<SnmpInstId, SnmpValue> tagResults = SnmpUtils.getOidValues(agentConfig, "CiscoIpSlaDetector", SnmpObjId.get(RTT_ADMIN_TAG_OID)); if (tagResults == null) { LOG.warn("isServiceDetected: No admin tags received!"); Map<SnmpInstId, SnmpValue> operStateResults = SnmpUtils.getOidValues(agentConfig, "CiscoIpSlaDetector", SnmpObjId.get(RTT_OPER_STATE_OID)); if (operStateResults == null) { LOG.warn("isServiceDetected: No operational states received!");
Map<SnmpInstId, SnmpValue> nameResults = SnmpUtils.getOidValues(agentConfig, "HostResourceSwRunMonitor", SnmpObjId.get(getServiceNameOid()));
@Override public boolean isServiceDetected(InetAddress address, SnmpAgentConfig agentConfig) { try { configureAgentPTR(agentConfig); configureAgentVersion(agentConfig); final String expectedValue = getVbvalue(); if (this.m_isTable) { LOG.debug(getServiceName() + ": table detect enabled"); final SnmpObjId snmpObjId = SnmpObjId.get(getOid()); final Map<SnmpInstId, SnmpValue> table = SnmpUtils.getOidValues(agentConfig, DEFAULT_SERVICE_NAME, snmpObjId); final List<String> retrievedValues = table.values().stream().map(snmpValue -> m_hex ? snmpValue.toHexString() : snmpValue.toString()).collect(Collectors.toList()); return isServiceDetected(this.matchType, retrievedValues, expectedValue); } else { final String retrievedValue = getValue(agentConfig, getOid(), m_hex); // we have to ensure that if expectedValue is defined, we use ANY, this is due to backwards compatibility MatchType matchType = this.matchType; if (matchType == null && expectedValue != null) { matchType = MatchType.Any; } return isServiceDetected(matchType, Lists.newArrayList(retrievedValue), expectedValue); } } catch (Throwable t) { throw new UndeclaredThrowableException(t); } }
Map<SnmpInstId,SnmpValue> arrayDisks = SnmpUtils.getOidValues(agentConfig, "OMSAStorageMonitor", arrayDiskLogicalConnectionVirtualDiskNumberSnmpObject); Map<SnmpInstId,SnmpValue> arrayDiskConnectionNumber = SnmpUtils.getOidValues(agentConfig,"OMSAStorageMonitor", arrayDiskLogicalConnectionArrayDiskNumberSnmpObject);
SnmpObjId laTableErrorSnmpObject = SnmpObjId.get(laTableErrorFlag); Map<SnmpInstId, SnmpValue> flagResults = SnmpUtils.getOidValues(agentConfig, "LaTableMonitor", laTableErrorSnmpObject);
Map<SnmpInstId, SnmpValue> descrResults = SnmpUtils.getOidValues(agentConfig, "DiskUsagePoller", hrStorageDescrSnmpObject);
SnmpObjId prTableErrorSnmpObject = SnmpObjId.get(prTableErrorFlag); Map<SnmpInstId, SnmpValue> flagResults = SnmpUtils.getOidValues(agentConfig, "PrTableMonitor", prTableErrorSnmpObject);
SnmpObjId dskTableErrorSnmpObject = SnmpObjId.get(dskTableErrorFlag); Map<SnmpInstId, SnmpValue> flagResults = SnmpUtils.getOidValues(agentConfig, "DskTableMonitor", dskTableErrorSnmpObject);
SnmpObjId snmpObjectId = SnmpObjId.get(oid); Map<SnmpInstId, SnmpValue> map = SnmpUtils.getOidValues(agentConfig, "AccessPointMonitor::InstanceStrategy", snmpObjectId);
SnmpObjId diskStatesSnmpObject = SnmpObjId.get(PHYSICAL_BASE_OID); Map<SnmpInstId,SnmpValue> arrayDisks = SnmpUtils.getOidValues(agentConfig, "PercMonitor", arrayPositionSnmpObject); Map<SnmpInstId,SnmpValue> diskStates = SnmpUtils.getOidValues(agentConfig, "PercMonitor", diskStatesSnmpObject);
SnmpObjId lmTableErrorSnmpObject = SnmpObjId.get(lmTableErrorFlag); Map<SnmpInstId, SnmpValue> flagResults = SnmpUtils.getOidValues(agentConfig, "LogMatchTableMonitor", lmTableErrorSnmpObject);
Map<SnmpInstId, SnmpValue> tagResults = SnmpUtils.getOidValues(agentConfig,"CiscoIpSlaMonitor",SnmpObjId.get(RTT_ADMIN_TAG_OID)); if (tagResults == null) { LOG.debug("No admin tags received! "); Map<SnmpInstId, SnmpValue> operSenseResults = SnmpUtils.getOidValues(agentConfig,"CiscoIpSlaMonitor",SnmpObjId.get(RTT_LATEST_OPERSENSE_OID)); if (operSenseResults == null) { LOG.debug("No latest oper sense received! "); Map<SnmpInstId, SnmpValue> operStateResults = SnmpUtils.getOidValues(agentConfig,"CiscoIpSlaMonitor",SnmpObjId.get(RTT_OPER_STATE_OID)); if (operStateResults == null) { LOG.debug("No oper state received! "); Map<SnmpInstId, SnmpValue> adminTypeResults = SnmpUtils.getOidValues(agentConfig,"CiscoIpSlaMonitor",SnmpObjId.get(RTT_ADMIN_TYPE_OID)); if (adminTypeResults == null) { LOG.debug("No ip sla types received! "); Map<SnmpInstId, SnmpValue> latestRttResults = SnmpUtils.getOidValues(agentConfig,"CiscoIpSlaMonitor",SnmpObjId.get(RTT_LATEST_OID)); if (latestRttResults == null) { LOG.debug("No ip sla latest RTT received! "); Map<SnmpInstId, SnmpValue> threshResults = SnmpUtils.getOidValues(agentConfig,"CiscoIpSlaMonitor",SnmpObjId.get(RTT_ADMIN_THRESH_OID)); if (monitorThresh && threshResults == null) { LOG.debug("No ip sla thresholds received! ");
SnmpObjId hrStorageDescrSnmpObject = SnmpObjId.get(hrStorageDescr); Map<SnmpInstId, SnmpValue> results = SnmpUtils.getOidValues(agentConfig, "DiskUsagePoller", hrStorageDescrSnmpObject);
SnmpObjId snmpObjectId = SnmpObjId.get(oid); Map<SnmpInstId, SnmpValue> map = SnmpUtils.getOidValues(agentConfig, "AccessPointMonitor::TableStrategy", snmpObjectId);