Interface NetworkElementFactoryInterface
-
- All Known Implementing Classes:
NetworkElementFactory
public interface NetworkElementFactoryInterface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<OnmsOutage>
currentOutagesForServiceFromPerspectivePoller(OnmsMonitoredService service)
Return all current open outages for the given service be it detected from local or from perspective.Interface[]
getActiveInterfacesOnNode(int nodeId)
getActiveInterfacesOnNodejava.util.List<OnmsApplication>
getAllApplications()
Interface[]
getAllInterfaces()
getAllInterfacesInterface[]
getAllInterfaces(boolean includeSnmp)
Interface[]
getAllInterfacesOnNode(int nodeId)
getAllInterfacesOnNodeInterface[]
getAllManagedIpInterfaces(boolean includeSNMP)
getAllManagedIpInterfacesInterface[]
getAllManagedIpInterfacesLike(java.lang.String ipHost)
Returns all managed interfaces that matches the ipHost String to either the ipHost or ipAddress field.java.util.List<OnmsNode>
getAllNodes()
Returns all non-deleted nodes.java.util.List<OnmsNode>
getAllNodes(int serviceId)
getAllNodesService[]
getAllServices()
getAllServicesInterface[]
getAllSnmpInterfacesOnNode(int nodeId)
Returns all SNMP interfaces on a nodejava.util.Map<OnmsMonitoredService,java.util.Map<java.lang.String,java.lang.Double>>
getApplicationServiceStatus(OnmsApplication onmsApplication, long start, long end)
ApplicationStatus
getApplicationStatus(OnmsApplication onmsApplication, long start, long end)
java.util.List<java.lang.String>
getCategories()
java.lang.String
getHostname(java.lang.String ipAddress)
Resolve an IP address to a DNS hostname via the database.java.lang.Integer
getIfIndex(int ipinterfaceid)
java.lang.Integer
getIfIndex(int nodeID, java.lang.String ipaddr)
Interface
getInterface(int ipInterfaceId)
getInterfaceInterface
getInterface(int nodeId, java.lang.String ipAddress)
getInterfaceInterface
getInterface(int nodeId, java.lang.String ipAddress, int ifIndex)
getInterfaceInterface[]
getInterfacesWithIfAlias(int nodeId, java.lang.String ifAlias)
Interface[]
getInterfacesWithIpAddress(java.lang.String ipAddress)
getInterfacesWithIpAddressjava.lang.String
getIpPrimaryAddress(int nodeId)
Find the IP address of the primary SNMP interface.java.util.List<OnmsMonitoringLocation>
getMonitoringLocations()
java.util.List<OnmsMonitoringSystem>
getMonitoringSystems()
OnmsNode
getNode(int nodeId)
Get a node based on it's node IDOnmsNode
getNode(java.lang.String lookupCriteria)
Get a node based on it's node ID or foreignSource:foreignIdjava.util.List<java.lang.Integer>
getNodeIdsWithIpLike(java.lang.String iplike)
Returns all non-deleted nodes with an IP address like the rule given.java.lang.String
getNodeLabel(int nodeId)
java.lang.String
getNodeLocation(int nodeId)
Get the location name associated with the node.java.util.List<OnmsNode>
getNodesFromPhysaddr(java.lang.String atPhysAddr)
getNodesFromPhysaddrjava.util.List<OnmsNode>
getNodesLike(java.lang.String nodeLabel)
Returns all non-deleted nodes that have the given nodeLabel substring somewhere in their nodeLabel.java.util.List<OnmsNode>
getNodesLike(java.lang.String nodeLabel, int serviceId)
getNodesLikejava.util.List<OnmsNode>
getNodesLikeAndIpLike(java.lang.String nodeLabel, java.lang.String iplike, int serviceId)
getNodesLikeAndIpLikejava.util.List<OnmsNode>
getNodesWithCategories(java.lang.String[] categories, boolean onlyNodesWithDownAggregateStatus)
getNodesWithCategoriesjava.util.List<OnmsNode>
getNodesWithCategories(java.lang.String[] categories1, java.lang.String[] categories2, boolean onlyNodesWithDownAggregateStatus)
getNodesWithCategoriesjava.util.List<OnmsNode>
getNodesWithIfAlias(java.lang.String ifAlias)
Returns all non-deleted nodes that contain the given string in an ifAliasjava.util.List<OnmsNode>
getNodesWithIpLike(java.lang.String iplike)
java.util.List<OnmsNode>
getNodesWithIpLike(java.lang.String iplike, int serviceId)
getNodesWithIpLikejava.util.List<OnmsNode>
getNodesWithPhysAddr(java.lang.String macAddr)
Returns all non-deleted nodes that have the given mac.java.util.List<OnmsNode>
getNodesWithPhysAddrAtInterface(java.lang.String macAddr)
Returns all non-deleted nodes with a MAC address like the rule given from AtInterface.java.util.List<OnmsNode>
getNodesWithPhysAddrFromSnmpInterface(java.lang.String macAddr)
Returns all non-deleted nodes with a MAC address like the rule given from SnmpInterface.java.util.List<OnmsNode>
getNodesWithService(int serviceId)
Returns all non-deleted nodes that have the given service.Scope
getScopeForInterface(java.lang.Integer nodeId, java.lang.String ipAddress)
Scope
getScopeForNode(java.lang.Integer nodeId)
Scope
getScopeForService(java.lang.Integer nodeId, java.net.InetAddress ipAddress, java.lang.String serviceName)
Service
getService(int ifServiceId)
Return the service specified by the node identifier, IP address, and service identifier.Service
getService(int nodeId, java.lang.String ipAddress, int serviceId)
Return the service specified by the node identifier, IP address, and service identifier.int
getServiceIdFromName(java.lang.String serviceName)
getServiceIdFromNamejava.util.Map<java.lang.Integer,java.lang.String>
getServiceIdToNameMap()
getServiceIdToNameMapjava.lang.String
getServiceNameFromId(int serviceId)
getServiceNameFromIdjava.util.Map<java.lang.String,java.lang.Integer>
getServiceNameToIdMap()
getServiceNameToIdMapService[]
getServicesOnInterface(int nodeId, java.lang.String ipAddress)
getServicesOnInterfaceService[]
getServicesOnInterface(int nodeId, java.lang.String ipAddress, boolean includeDeletions)
getServicesOnInterfaceService[]
getServicesOnNode(int nodeId)
Get the list of all services on a given node.Service[]
getServicesOnNode(int nodeId, int serviceId)
Get the list of all instances of a specific service on a given node.Interface
getSnmpInterface(int nodeId, int ifIndex)
Get interface from snmpinterface table.boolean
nodeExistsInRequisition(java.lang.String foreignSource, java.lang.String foreignId)
-
-
-
Method Detail
-
getNodeLabel
java.lang.String getNodeLabel(int nodeId)
-
getNodeLocation
java.lang.String getNodeLocation(int nodeId)
Get the location name associated with the node.- Parameters:
nodeId
- the node's ID- Returns:
- the location as a string, or null if the node does not have a location
-
getIpPrimaryAddress
java.lang.String getIpPrimaryAddress(int nodeId)
Find the IP address of the primary SNMP interface.- Parameters:
nodeId
- an int.- Returns:
- An IPv4 or IPv6 address in string format or null if the node has no primary SNMP interface
-
getNode
OnmsNode getNode(int nodeId)
Get a node based on it's node ID- Parameters:
nodeId
- an int- Returns:
- a
OnmsNode
object
-
getNode
OnmsNode getNode(java.lang.String lookupCriteria)
Get a node based on it's node ID or foreignSource:foreignId- Parameters:
lookupCriteria
- the criteria, either the node ID, or a colon-separated string of foreignSource:foreignId- Returns:
- a
OnmsNode
object
-
getAllNodes
java.util.List<OnmsNode> getAllNodes()
Returns all non-deleted nodes.- Returns:
- an array of
OnmsNode
objects.
-
getNodesLike
java.util.List<OnmsNode> getNodesLike(java.lang.String nodeLabel)
Returns all non-deleted nodes that have the given nodeLabel substring somewhere in their nodeLabel.- Parameters:
nodeLabel
- aString
object.- Returns:
- an array of
OnmsNode
objects.
-
getNodesWithIpLike
java.util.List<OnmsNode> getNodesWithIpLike(java.lang.String iplike)
-
getNodesWithService
java.util.List<OnmsNode> getNodesWithService(int serviceId)
Returns all non-deleted nodes that have the given service.- Parameters:
serviceId
- a int.- Returns:
- an array of
OnmsNode
objects.
-
getNodesWithPhysAddr
java.util.List<OnmsNode> getNodesWithPhysAddr(java.lang.String macAddr)
Returns all non-deleted nodes that have the given mac.- Parameters:
macAddr
- aString
object.- Returns:
- an array of
OnmsNode
objects.
-
getNodesWithPhysAddrAtInterface
java.util.List<OnmsNode> getNodesWithPhysAddrAtInterface(java.lang.String macAddr)
Returns all non-deleted nodes with a MAC address like the rule given from AtInterface.- Parameters:
macAddr
- aString
object.- Returns:
- an array of
OnmsNode
objects.
-
getNodesWithPhysAddrFromSnmpInterface
java.util.List<OnmsNode> getNodesWithPhysAddrFromSnmpInterface(java.lang.String macAddr)
Returns all non-deleted nodes with a MAC address like the rule given from SnmpInterface.- Parameters:
macAddr
- aString
object.- Returns:
- an array of
OnmsNode
objects.
-
getNodesWithIfAlias
java.util.List<OnmsNode> getNodesWithIfAlias(java.lang.String ifAlias)
Returns all non-deleted nodes that contain the given string in an ifAlias- Parameters:
ifAlias
- aString
object.- Returns:
- nodes the nodes with a matching ifAlias on one or more interfaces
-
getHostname
java.lang.String getHostname(java.lang.String ipAddress)
Resolve an IP address to a DNS hostname via the database. If no hostname can be found, the given IP address is returned.- Parameters:
ipAddress
- aString
object.- Returns:
- a
String
object.
-
getInterface
Interface getInterface(int ipInterfaceId)
getInterface
- Parameters:
ipInterfaceId
- a int.- Returns:
- a
Interface
object.
-
getInterface
Interface getInterface(int nodeId, java.lang.String ipAddress)
getInterface
- Parameters:
nodeId
- a int.ipAddress
- aString
object.- Returns:
- a
Interface
object.
-
getInterface
Interface getInterface(int nodeId, java.lang.String ipAddress, int ifIndex)
getInterface
- Parameters:
nodeId
- a int.ipAddress
- aString
object.ifindex
- a int.- Returns:
- a
Interface
object.
-
getSnmpInterface
Interface getSnmpInterface(int nodeId, int ifIndex)
Get interface from snmpinterface table. Intended for use with non-ip interfaces.- Parameters:
nodeId
- a int.ifIndex
- a int.- Returns:
- Interface
-
getInterfacesWithIpAddress
Interface[] getInterfacesWithIpAddress(java.lang.String ipAddress)
getInterfacesWithIpAddress
- Parameters:
ipAddress
- aString
object.- Returns:
- an array of
Interface
objects.
-
getInterfacesWithIfAlias
Interface[] getInterfacesWithIfAlias(int nodeId, java.lang.String ifAlias)
-
getAllInterfacesOnNode
Interface[] getAllInterfacesOnNode(int nodeId)
getAllInterfacesOnNode
- Parameters:
nodeId
- a int.- Returns:
- an array of
Interface
objects.
-
getAllSnmpInterfacesOnNode
Interface[] getAllSnmpInterfacesOnNode(int nodeId)
Returns all SNMP interfaces on a node- Parameters:
nodeId
- a int.- Returns:
- Interface[]
-
getActiveInterfacesOnNode
Interface[] getActiveInterfacesOnNode(int nodeId)
getActiveInterfacesOnNode
- Parameters:
nodeId
- a int.- Returns:
- an array of
Interface
objects.
-
getAllInterfaces
Interface[] getAllInterfaces()
getAllInterfaces
- Returns:
- an array of
Interface
objects.
-
getAllInterfaces
Interface[] getAllInterfaces(boolean includeSnmp)
-
getAllManagedIpInterfaces
Interface[] getAllManagedIpInterfaces(boolean includeSNMP)
getAllManagedIpInterfaces
- Parameters:
includeSNMP
- a boolean.- Returns:
- an array of
Interface
objects.
-
getAllManagedIpInterfacesLike
Interface[] getAllManagedIpInterfacesLike(java.lang.String ipHost)
Returns all managed interfaces that matches the ipHost String to either the ipHost or ipAddress field.- Parameters:
ipHost
-- Returns:
- an arrau of
Interface
objects
-
getService
Service getService(int nodeId, java.lang.String ipAddress, int serviceId)
Return the service specified by the node identifier, IP address, and service identifier.Note that if there are both an active service and historically deleted services with this (nodeid, ipAddress, serviceId) key, then the active service will be returned. If there are only deleted services, then the first deleted service will be returned.
- Parameters:
nodeId
- a int.ipAddress
- aString
object.serviceId
- a int.- Returns:
- a
Service
object.
-
getService
Service getService(int ifServiceId)
Return the service specified by the node identifier, IP address, and service identifier.Note that if there are both an active service and historically deleted services with this (nodeid, ipAddress, serviceId) key, then the active service will be returned. If there are only deleted services, then the first deleted service will be returned.
- Parameters:
ifServiceId
- a int.- Returns:
- a
Service
object.
-
getServicesOnInterface
Service[] getServicesOnInterface(int nodeId, java.lang.String ipAddress)
getServicesOnInterface
- Parameters:
nodeId
- a int.ipAddress
- aString
object.- Returns:
- an array of
Service
objects.
-
getServicesOnInterface
Service[] getServicesOnInterface(int nodeId, java.lang.String ipAddress, boolean includeDeletions)
getServicesOnInterface
- Parameters:
nodeId
- a int.ipAddress
- aString
object.includeDeletions
- a boolean.- Returns:
- an array of
Service
objects.
-
getServicesOnNode
Service[] getServicesOnNode(int nodeId)
Get the list of all services on a given node.- Parameters:
nodeId
- a int.- Returns:
- an array of
Service
objects.
-
getServicesOnNode
Service[] getServicesOnNode(int nodeId, int serviceId)
Get the list of all instances of a specific service on a given node.- Parameters:
nodeId
- a int.serviceId
- a int.- Returns:
- an array of
Service
objects.
-
getServiceNameFromId
java.lang.String getServiceNameFromId(int serviceId)
getServiceNameFromId
- Parameters:
serviceId
- a int.- Returns:
- a
String
object.
-
getServiceIdFromName
int getServiceIdFromName(java.lang.String serviceName)
getServiceIdFromName
- Parameters:
serviceName
- aString
object.- Returns:
- a int.
-
getServiceIdToNameMap
java.util.Map<java.lang.Integer,java.lang.String> getServiceIdToNameMap()
getServiceIdToNameMap
- Returns:
- a java$util$Map object.
-
getServiceNameToIdMap
java.util.Map<java.lang.String,java.lang.Integer> getServiceNameToIdMap()
getServiceNameToIdMap
- Returns:
- a java$util$Map object.
-
getNodesLikeAndIpLike
java.util.List<OnmsNode> getNodesLikeAndIpLike(java.lang.String nodeLabel, java.lang.String iplike, int serviceId)
getNodesLikeAndIpLike
- Parameters:
nodeLabel
- aString
object.iplike
- aString
object.serviceId
- a int.- Returns:
- an array of
OnmsNode
objects.
-
getNodesLike
java.util.List<OnmsNode> getNodesLike(java.lang.String nodeLabel, int serviceId)
getNodesLike
- Parameters:
nodeLabel
- aString
object.serviceId
- a int.- Returns:
- an array of
OnmsNode
objects.
-
getNodesWithIpLike
java.util.List<OnmsNode> getNodesWithIpLike(java.lang.String iplike, int serviceId)
getNodesWithIpLike
- Parameters:
iplike
- aString
object.serviceId
- a int.- Returns:
- an array of
OnmsNode
objects.
-
getAllNodes
java.util.List<OnmsNode> getAllNodes(int serviceId)
getAllNodes
- Parameters:
serviceId
- a int.- Returns:
- an array of
OnmsNode
objects.
-
getNodesFromPhysaddr
java.util.List<OnmsNode> getNodesFromPhysaddr(java.lang.String atPhysAddr)
getNodesFromPhysaddr
- Parameters:
atPhysAddr
- aString
object.- Returns:
- an array of
OnmsNode
objects.
-
getNodeIdsWithIpLike
java.util.List<java.lang.Integer> getNodeIdsWithIpLike(java.lang.String iplike)
Returns all non-deleted nodes with an IP address like the rule given.- Parameters:
iplike
- aString
object.- Returns:
- a
List
object.
-
getNodesWithCategories
java.util.List<OnmsNode> getNodesWithCategories(java.lang.String[] categories, boolean onlyNodesWithDownAggregateStatus)
getNodesWithCategories
- Parameters:
nodeDao
- aNodeDao
object.categoryDao
- aCategoryDao
object.categories1
- an array ofString
objects.onlyNodesWithDownAggregateStatus
- a boolean.- Returns:
- an array of
OnmsNode
objects.
-
getNodesWithCategories
java.util.List<OnmsNode> getNodesWithCategories(java.lang.String[] categories1, java.lang.String[] categories2, boolean onlyNodesWithDownAggregateStatus)
getNodesWithCategories
- Parameters:
nodeDao
- aNodeDao
object.categoryDao
- aCategoryDao
object.categories1
- an array ofString
objects.categories2
- an array ofString
objects.onlyNodesWithDownAggregateStatus
- a boolean.- Returns:
- an array of
OnmsNode
objects.
-
getIfIndex
java.lang.Integer getIfIndex(int ipinterfaceid)
-
getIfIndex
java.lang.Integer getIfIndex(int nodeID, java.lang.String ipaddr)
-
getMonitoringLocations
java.util.List<OnmsMonitoringLocation> getMonitoringLocations()
-
getMonitoringSystems
java.util.List<OnmsMonitoringSystem> getMonitoringSystems()
-
nodeExistsInRequisition
boolean nodeExistsInRequisition(java.lang.String foreignSource, java.lang.String foreignId)
-
getCategories
java.util.List<java.lang.String> getCategories()
-
currentOutagesForServiceFromPerspectivePoller
java.util.Collection<OnmsOutage> currentOutagesForServiceFromPerspectivePoller(OnmsMonitoredService service)
Return all current open outages for the given service be it detected from local or from perspective.
-
getAllApplications
java.util.List<OnmsApplication> getAllApplications()
-
getApplicationStatus
ApplicationStatus getApplicationStatus(OnmsApplication onmsApplication, long start, long end)
-
getApplicationServiceStatus
java.util.Map<OnmsMonitoredService,java.util.Map<java.lang.String,java.lang.Double>> getApplicationServiceStatus(OnmsApplication onmsApplication, long start, long end)
-
getScopeForNode
Scope getScopeForNode(java.lang.Integer nodeId)
-
getScopeForInterface
Scope getScopeForInterface(java.lang.Integer nodeId, java.lang.String ipAddress)
-
getScopeForService
Scope getScopeForService(java.lang.Integer nodeId, java.net.InetAddress ipAddress, java.lang.String serviceName)
-
-