/** {@inheritDoc} */ @Override public String marshal(InetAddress inetAddr) throws Exception { return InetAddrUtils.str(inetAddr); }
@Override public String toString() { return InetAddrUtils.str(m_address) + ":" + m_port; } }
@Override public String getHostAddress() { return address != null ? InetAddrUtils.str(address) : null; }
public IpAddressSnmpValue(InetAddress addr) { this(InetAddrUtils.str(addr)); }
@Override public String toString() { return String.format("CollectionAgentDTO[attributes=%s, address=%s, storeByForeignSource=%s, " + "nodeId=%d, nodeLabel=%s, foreignSource=%s, foreignId=%s, location=%s, storageDir=%s, " + "sysUpTime=%d]", attributes, address != null ? InetAddrUtils.str(address) : null, storeByForeignSource, nodeId, nodeLabel, foreignSource, foreignId, location, storageResourcePath, sysUpTime); }
public SnmpAgentTimeoutException(String name, InetAddress agentAddress) { super(String.format("Timeout retrieving '%s' for %s.", name, InetAddrUtils.str(agentAddress))); } }
public static String addrStr(byte[] bytes) { try { return InetAddrUtils.str(InetAddress.getByAddress(bytes)); } catch (UnknownHostException e) { throw new RuntimeException(e); } }
@Override public Map<String, Object> getRuntimeAttributes(MonitoredService svc, Map<String, Object> parameters) { final Map<String, Object> attributes = new HashMap<>(super.getRuntimeAttributes(svc, parameters)); // Determine the target address final InetAddress targetIpAddr = (InetAddress) determineTargetAddress(svc, parameters); // Determine the node to use as our IOS ping proxy final InetAddress proxyIpAddr = determineProxyAddress(parameters, svc); if (proxyIpAddr == null) { LOG.debug("Unable to determine proxy address for this service"); throw new IllegalStateException("Unable to determine proxy address for this service"); } attributes.put("targetIpAddr", InetAddrUtils.str(targetIpAddr)); attributes.put("proxyIpAddr", InetAddrUtils.str(proxyIpAddr)); return attributes; }
public Map<String, String> toMap() { Map<String, String> map = new LinkedHashMap<>(); map.put("address", m_address == null ? null : InetAddrUtils.str(m_address)); map.put("proxyFor", m_proxyFor == null ? null : InetAddrUtils.str(m_proxyFor)); map.put("port", Integer.toString(getPort())); map.put("timeout", Integer.toString(getTimeout())); map.put("retries", Integer.toString(getRetries())); map.put("max-vars-per-pdu", Integer.toString(getMaxVarsPerPdu())); map.put("max-repetitions", Integer.toString(getMaxRepetitions())); map.put("max-request-size", Integer.toString(getMaxRequestSize())); map.put("version", Integer.toString(getVersion())); map.put("security-level", Integer.toString(getSecurityLevel())); map.put("security-name", getSecurityName()); map.put("auth-passphrase", getAuthPassPhrase()); map.put("auth-protocol", getAuthProtocol()); map.put("priv-passphrase", getPrivPassPhrase()); map.put("priv-protocol", getPrivProtocol()); map.put("context-name", getContextName()); map.put("engine-id", getEngineId()); map.put("context-engine-id", getContextEngineId()); map.put("enterprise-id", getEnterpriseId()); map.put("read-community", getReadCommunity()); map.put("write-community", getWriteCommunity()); return map; }
final SnmpAgentConfig agent = snmpAgentConfigFactory.getAgentConfig(agentAdress, m_location); System.out.println("Address: " + InetAddrUtils.str(agent.getAddress())); System.out.println("ProxyForAddress: " + InetAddrUtils.str(agent.getProxyFor())); System.out.println("Port: " + agent.getPort()); System.out.println("Timeout: " + agent.getTimeout());
@Override public SnmpWalker createWalker(final SnmpAgentConfig agentConfig, final String name, final CollectionTracker tracker) { LOG.debug("createWalker({}/{}, {}, {})", InetAddrUtils.str(agentConfig.getAddress()), agentConfig.getPort(), name, tracker.getClass().getName()); final SnmpAgentAddress aa = new SnmpAgentAddress(agentConfig.getAddress(), agentConfig.getPort()); final PropertyOidContainer oidContainer = getOidContainer(aa); return new MockSnmpWalker(aa, agentConfig.getVersion(), oidContainer, name, tracker, agentConfig.getMaxVarsPerPdu(), agentConfig.getRetries()); }
if (!(cSvc.getNodeId() == nodeId && InetAddrUtils.str(addr).equals(ipAddr))) continue; LOG.debug("Marking CollectableService for deletion because an interface was deleted: Service nodeid={}, deleted node:{}service address:{}deleted interface:{}", cSvc.getNodeId(), nodeId, InetAddrUtils.str(addr), ipAddr);
InetAddrUtils.str(addr).equals(ipAddr) && cSvc.getServiceName().equals(svcName))) continue; LOG.debug("Marking CollectableService for deletion because a service was deleted: Service nodeid={}, deleted node:{}, service address:{}, deleted interface:{}, service servicename:{}, deleted service name:{}, event source {}", cSvc.getNodeId(), nodeId, InetAddrUtils.str(addr), ipAddr, cSvc.getServiceName(), svcName, event.getSource()); updates.markForDeletion();
LOG.debug("Critical path test failed for node {}", nodeId); bldr.addParam(EventConstants.PARM_LOSTSERVICE_REASON, EventConstants.PARM_VALUE_PATHOUTAGE); bldr.addParam(EventConstants.PARM_CRITICAL_PATH_IP, InetAddrUtils.str(criticalPath.getIpAddress())); bldr.addParam(EventConstants.PARM_CRITICAL_PATH_SVC, criticalPath.getServiceName()); } else {
final String ldapDn = resolveKeyedString(parameters, "dn", null); String address = InetAddrUtils.str(svc.getAddress());