@Entity public class OnmsNode extends OnmsEntity implements Serializable, Comparable<OnmsNode>
| Modifier and Type | Class and Description |
|---|---|
static class |
OnmsNode.NodeLabelSource |
static class |
OnmsNode.NodeType |
| Constructor and Description |
|---|
OnmsNode()
Constructor for OnmsNode.
|
OnmsNode(OnmsMonitoringLocation location)
Constructor for OnmsNode.
|
OnmsNode(OnmsMonitoringLocation location,
String label)
Constructor for OnmsNode.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCategory(OnmsCategory category)
addCategory
|
void |
addIpInterface(OnmsIpInterface iface)
addIpInterface
|
void |
addMetaData(String context,
String key,
String value) |
void |
addRequisionedMetaData(OnmsMetaData onmsMetaData) |
void |
addRequisitionedCategory(String category) |
void |
addSnmpInterface(OnmsSnmpInterface snmpIface)
addSnmpInterface
|
int |
compareTo(OnmsNode o)
compareTo
|
boolean |
containsInterface(InetAddress addr) |
boolean |
containsService(InetAddress addr,
String service) |
Optional<OnmsMetaData> |
findMetaDataForContextAndKey(String context,
String key) |
OnmsAssetRecord |
getAssetRecord()
The assert record associated with this node
|
Set<OnmsCategory> |
getCategories()
getCategories
|
Date |
getCreateTime()
Time node was added to the database.
|
OnmsIpInterface |
getCriticalInterface()
getCriticalInterface
|
String |
getForeignId()
getForeignId
|
String |
getForeignSource()
getForeignSource
|
boolean |
getHasEgressFlows() |
boolean |
getHasFlows() |
boolean |
getHasIngressFlows() |
Integer |
getId()
Unique identifier for node.
|
List<OnmsIpInterface> |
getInterfacesWithService(String svcName)
getInterfacesWithService
|
OnmsIpInterface |
getInterfaceWithAddress(InetAddress addr) |
OnmsIpInterface |
getInterfaceWithService(String svcName)
getInterfaceWithService
|
OnmsIpInterface |
getIpInterfaceByIpAddress(InetAddress ipAddress)
getIpInterfaceByIpAddress
|
OnmsIpInterface |
getIpInterfaceByIpAddress(String ipAddress)
getIpInterfaceByIpAddress
|
Set<OnmsIpInterface> |
getIpInterfaces()
The interfaces on this node
|
String |
getLabel()
User-friendly name associated with the node.
|
OnmsNode.NodeLabelSource |
getLabelSource()
Flag indicating source of nodeLabel
- 'U' = user defined
- 'H' = IP hostname
- 'S' = sysName
- 'A' = IP address
TODO: change this to an enum
|
Date |
getLastCapsdPoll()
Date and time of last Capsd scan.
|
Date |
getLastEgressFlow() |
Date |
getLastIngressFlow() |
OnmsMonitoringLocation |
getLocation()
Monitoring location that this node is located in.
|
List<OnmsMetaData> |
getMetaData() |
String |
getNetBiosDomain()
NetBIOS domain name associated with the node.
|
String |
getNetBiosName()
NetBIOS workstation name associated with the node.
|
String |
getNodeId()
getNodeId
|
String |
getOperatingSystem()
Operating system running on the node.
|
OnmsNode |
getParent()
In the case that the node is virtual or an independent device in a chassis
that should be reflected as a subcomponent or "child", this field reflects
the nodeID of the chassis/physical node/"parent" device.
|
PathElement |
getPathElement()
getPathElement
|
OnmsIpInterface |
getPrimaryInterface()
getPrimaryInterface
|
Set<String> |
getRequisitionedCategories() |
List<OnmsMetaData> |
getRequisitionedMetaData() |
Set<OnmsSnmpInterface> |
getSnmpInterfaces()
The information from the SNMP interfaces/ipAddrTables for the node
|
OnmsSnmpInterface |
getSnmpInterfaceWithIfIndex(int ifIndex)
getSnmpInterfaceWithIfIndex
|
String |
getSysContact()
SNMP MIB-2 system.sysContact.0
|
String |
getSysDescription()
SNMP MIB-2 system.sysDescr.0
|
String |
getSysLocation()
SNMP MIB-2 system.sysLocation.0
|
String |
getSysName()
SNMP MIB-2 system.sysName.0
|
String |
getSysObjectId()
SNMP MIB-2 system.sysObjectID.0
|
OnmsNode.NodeType |
getType()
Flag indicating status of node
- 'A' - active
- 'D' - deleted
TODO: Eventually this will be deprecated and deleted nodes will actually be deleted.
|
boolean |
hasCategory(String categoryName)
hasCategory
|
boolean |
isDown()
isDown
|
void |
mergeAgentAttributes(OnmsNode scannedNode)
mergeAgentAttributes
|
void |
mergeAssets(OnmsNode scannedNode)
Truly merges the node's assert record
|
void |
mergeCategorySet(OnmsNode scannedNode)
mergeCategorySet
|
void |
mergeIpInterfaces(OnmsNode scannedNode,
EventForwarder eventForwarder,
boolean deleteMissing)
mergeIpInterfaces
|
void |
mergeMetaData(OnmsNode scanned)
Truly merges the node's meta-data
|
void |
mergeNode(OnmsNode scannedNode,
EventForwarder eventForwarder,
boolean deleteMissing)
mergeNode
|
void |
mergeNodeAttributes(OnmsNode scannedNode,
EventForwarder eventForwarder)
mergeNodeAttributes
|
void |
mergeSnmpInterfaces(OnmsNode scannedNode,
boolean deleteMissing)
mergeSnmpInterfaces
|
boolean |
removeCategory(OnmsCategory category)
removeCategory
|
void |
removeIpInterface(OnmsIpInterface iface) |
void |
removeMetaData(String context) |
void |
removeMetaData(String context,
String key) |
void |
removeRequisitionedCategory(String category) |
void |
replaceCurrentAssetRecord(OnmsNode scannedNode)
Simply replaces the current asset record with the new record
|
void |
setAssetRecord(OnmsAssetRecord asset)
setAssetRecord
|
void |
setCategories(Set<OnmsCategory> categories)
setCategories
|
void |
setCreateTime(Date nodecreatetime)
setCreateTime
|
void |
setForeignId(String foreignId)
setForeignId
|
void |
setForeignSource(String foreignSource)
setForeignSource
|
void |
setId(Integer nodeid)
setId
|
void |
setIpInterfaces(Set<OnmsIpInterface> ipinterfaces)
setIpInterfaces
|
void |
setLabel(String nodelabel)
setLabel
|
void |
setLabelSource(OnmsNode.NodeLabelSource nodelabelsource)
setLabelSource
|
void |
setLastCapsdPoll(Date lastcapsdpoll)
setLastCapsdPoll
|
void |
setLastEgressFlow(Date lastEgressFlow) |
void |
setLastIngressFlow(Date lastIngressFlow) |
void |
setLocation(OnmsMonitoringLocation location)
Set the monitoring location that this node is located in.
|
void |
setMetaData(List<OnmsMetaData> metaData) |
void |
setNetBiosDomain(String nodedomainname)
setNetBiosDomain
|
void |
setNetBiosName(String nodenetbiosname)
setNetBiosName
|
void |
setNodeId(String nodeid)
setNodeId
|
void |
setOperatingSystem(String operatingsystem)
setOperatingSystem
|
void |
setParent(OnmsNode parent)
setParent
|
void |
setPathElement(PathElement pathElement)
setPathElement
|
void |
setRequisionedMetaData(List<OnmsMetaData> requisitionedMetaData) |
void |
setRequisitionedCategories(Set<String> categories) |
void |
setSnmpInterfaces(Set<OnmsSnmpInterface> snmpinterfaces)
setSnmpInterfaces
|
void |
setSysContact(String nodesyscontact)
setSysContact
|
void |
setSysDescription(String nodesysdescription)
setSysDescription
|
void |
setSysLocation(String nodesyslocation)
setSysLocation
|
void |
setSysName(String nodesysname)
setSysName
|
void |
setSysObjectId(String nodesysoid)
setSysObjectId
|
void |
setType(OnmsNode.NodeType nodetype)
setType
|
String |
toString()
toString
|
void |
visit(EntityVisitor visitor)
visit
|
hasNewValuepublic OnmsNode()
Constructor for OnmsNode. This constructor should only be used
by JAXB and by unit tests that do not need to persist the OnmsNode
in the database. It does not associate the OnmsNode with a
required OnmsMonitoringLocation.
public OnmsNode(OnmsMonitoringLocation location)
Constructor for OnmsNode.
location - The location where this node is locatedpublic OnmsNode(OnmsMonitoringLocation location, String label)
Constructor for OnmsNode.
location - The location where this node is locatedlabel - The node labelpublic Date getCreateTime()
Date object.public void setCreateTime(Date nodecreatetime)
setCreateTime
nodecreatetime - a Date object.public OnmsNode getParent()
OnmsNode object.public OnmsNode.NodeType getType()
String object.public void setType(OnmsNode.NodeType nodetype)
setType
nodetype - a String object.public String getSysObjectId()
String object.public void setSysObjectId(String nodesysoid)
setSysObjectId
nodesysoid - a String object.public void setSysName(String nodesysname)
setSysName
nodesysname - a String object.public boolean getHasFlows()
public boolean getHasIngressFlows()
public boolean getHasEgressFlows()
public Date getLastIngressFlow()
public void setLastIngressFlow(Date lastIngressFlow)
public Date getLastEgressFlow()
public void setLastEgressFlow(Date lastEgressFlow)
public String getSysDescription()
String object.public void setSysDescription(String nodesysdescription)
setSysDescription
nodesysdescription - a String object.public String getSysLocation()
String object.public void setSysLocation(String nodesyslocation)
setSysLocation
nodesyslocation - a String object.public String getSysContact()
String object.public void setSysContact(String nodesyscontact)
setSysContact
nodesyscontact - a String object.public String getLabel()
String object.public OnmsNode.NodeLabelSource getLabelSource()
String object.public void setLabelSource(OnmsNode.NodeLabelSource nodelabelsource)
setLabelSource
nodelabelsource - a String object.public String getNetBiosName()
String object.public void setNetBiosName(String nodenetbiosname)
setNetBiosName
nodenetbiosname - a String object.public String getNetBiosDomain()
String object.public void setNetBiosDomain(String nodedomainname)
setNetBiosDomain
nodedomainname - a String object.public String getOperatingSystem()
String object.public void setOperatingSystem(String operatingsystem)
setOperatingSystem
operatingsystem - a String object.public Date getLastCapsdPoll()
Date object.public void setLastCapsdPoll(Date lastcapsdpoll)
setLastCapsdPoll
lastcapsdpoll - a Date object.public void setForeignId(String foreignId)
setForeignId
foreignId - a String object.public void setForeignSource(String foreignSource)
setForeignSource
foreignSource - a String object.public OnmsMonitoringLocation getLocation()
public void setLocation(OnmsMonitoringLocation location)
public OnmsAssetRecord getAssetRecord()
OnmsAssetRecord object.public void setAssetRecord(OnmsAssetRecord asset)
setAssetRecord
asset - a OnmsAssetRecord object.public PathElement getPathElement()
getPathElement
PathElement object.public void setPathElement(PathElement pathElement)
setPathElement
pathElement - a PathElement object.public Set<OnmsIpInterface> getIpInterfaces()
Set object.public void setIpInterfaces(Set<OnmsIpInterface> ipinterfaces)
setIpInterfaces
ipinterfaces - a Set object.public void addIpInterface(OnmsIpInterface iface)
addIpInterface
iface - a OnmsIpInterface object.public void removeIpInterface(OnmsIpInterface iface)
public Set<OnmsSnmpInterface> getSnmpInterfaces()
Set object.public void setSnmpInterfaces(Set<OnmsSnmpInterface> snmpinterfaces)
setSnmpInterfaces
snmpinterfaces - a Set object.public Set<OnmsCategory> getCategories()
getCategories
Set object.public void setCategories(Set<OnmsCategory> categories)
setCategories
categories - a Set object.public boolean addCategory(OnmsCategory category)
addCategory
category - a OnmsCategory object.public boolean removeCategory(OnmsCategory category)
removeCategory
category - a OnmsCategory object.public boolean hasCategory(String categoryName)
hasCategory
categoryName - a String object.public void addRequisitionedCategory(String category)
public void removeRequisitionedCategory(String category)
public List<OnmsMetaData> getMetaData()
public Optional<OnmsMetaData> findMetaDataForContextAndKey(String context, String key)
public void setMetaData(List<OnmsMetaData> metaData)
public void removeMetaData(String context)
public List<OnmsMetaData> getRequisitionedMetaData()
public void setRequisionedMetaData(List<OnmsMetaData> requisitionedMetaData)
public void addRequisionedMetaData(OnmsMetaData onmsMetaData)
public String toString()
toString
public void visit(EntityVisitor visitor)
visit
visit in class OnmsEntityvisitor - a EntityVisitor object.public void addSnmpInterface(OnmsSnmpInterface snmpIface)
addSnmpInterface
snmpIface - a OnmsSnmpInterface object.public boolean isDown()
isDown
public OnmsSnmpInterface getSnmpInterfaceWithIfIndex(int ifIndex)
getSnmpInterfaceWithIfIndex
ifIndex - a int.OnmsSnmpInterface object.public OnmsIpInterface getIpInterfaceByIpAddress(String ipAddress)
getIpInterfaceByIpAddress
ipAddress - a String object.OnmsIpInterface object.public OnmsIpInterface getIpInterfaceByIpAddress(InetAddress ipAddress)
getIpInterfaceByIpAddress
ipAddress - a String object.OnmsIpInterface object.public int compareTo(OnmsNode o)
compareTo
compareTo in interface Comparable<OnmsNode>o - a OnmsNode object.public OnmsIpInterface getPrimaryInterface()
getPrimaryInterface
This function should be kept similar toIpInterfaceDao#findPrimaryInterfaceByNodeId().OnmsIpInterface object.public OnmsIpInterface getInterfaceWithService(String svcName)
getInterfaceWithService
svcName - a String object.OnmsIpInterface object.public List<OnmsIpInterface> getInterfacesWithService(String svcName)
getInterfacesWithService
svcName - a String object.OnmsIpInterface objects.public OnmsIpInterface getInterfaceWithAddress(InetAddress addr)
public OnmsIpInterface getCriticalInterface()
getCriticalInterface
OnmsIpInterface object.public void mergeAgentAttributes(OnmsNode scannedNode)
mergeAgentAttributes
scannedNode - a OnmsNode object.public void mergeNodeAttributes(OnmsNode scannedNode, EventForwarder eventForwarder)
mergeNodeAttributes
scannedNode - a OnmsNode object.public void mergeSnmpInterfaces(OnmsNode scannedNode, boolean deleteMissing)
mergeSnmpInterfaces
scannedNode - a OnmsNode object.deleteMissing - a boolean.public void mergeIpInterfaces(OnmsNode scannedNode, EventForwarder eventForwarder, boolean deleteMissing)
mergeIpInterfaces
scannedNode - a OnmsNode object.eventForwarder - a EventForwarder object.deleteMissing - a boolean.public void mergeCategorySet(OnmsNode scannedNode)
mergeCategorySet
scannedNode - a OnmsNode object.public void mergeAssets(OnmsNode scannedNode)
scannedNode - a OnmsNode object.public void mergeMetaData(OnmsNode scanned)
scannedNode - a OnmsNode object.public void replaceCurrentAssetRecord(OnmsNode scannedNode)
scannedNode - a OnmsNode object.public void mergeNode(OnmsNode scannedNode, EventForwarder eventForwarder, boolean deleteMissing)
mergeNode
scannedNode - a OnmsNode object.eventForwarder - a EventForwarder object.deleteMissing - a boolean.public boolean containsService(InetAddress addr, String service)
public boolean containsInterface(InetAddress addr)
Copyright © 2022. All rights reserved.