Interface NetworkElementFactoryInterface
-
- All Known Implementing Classes:
NetworkElementFactory
public interface NetworkElementFactoryInterface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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)getActiveInterfacesOnNodeList<OnmsApplication>getAllApplications()Interface[]getAllInterfaces()getAllInterfacesInterface[]getAllInterfaces(boolean includeSnmp)Interface[]getAllInterfacesOnNode(int nodeId)getAllInterfacesOnNodeInterface[]getAllManagedIpInterfaces(boolean includeSNMP)getAllManagedIpInterfacesInterface[]getAllManagedIpInterfacesLike(String ipHost)Returns all managed interfaces that matches the ipHost String to either the ipHost or ipAddress field.List<OnmsNode>getAllNodes()Returns all non-deleted nodes.List<OnmsNode>getAllNodes(int serviceId)getAllNodesService[]getAllServices()getAllServicesInterface[]getAllSnmpInterfacesOnNode(int nodeId)Returns all SNMP interfaces on a nodeMap<OnmsMonitoredService,Map<String,Double>>getApplicationServiceStatus(OnmsApplication onmsApplication, long start, long end)ApplicationStatusgetApplicationStatus(OnmsApplication onmsApplication, long start, long end)List<String>getCategories()StringgetHostname(String ipAddress)Resolve an IP address to a DNS hostname via the database.IntegergetIfIndex(int ipinterfaceid)IntegergetIfIndex(int nodeID, String ipaddr)InterfacegetInterface(int ipInterfaceId)getInterfaceInterfacegetInterface(int nodeId, String ipAddress)getInterfaceInterfacegetInterface(int nodeId, String ipAddress, int ifIndex)getInterfaceInterface[]getInterfacesWithIfAlias(int nodeId, String ifAlias)Interface[]getInterfacesWithIpAddress(String ipAddress)getInterfacesWithIpAddressStringgetIpPrimaryAddress(int nodeId)Find the IP address of the primary SNMP interface.List<OnmsMonitoringLocation>getMonitoringLocations()List<OnmsMonitoringSystem>getMonitoringSystems()OnmsNodegetNode(int nodeId)Get a node based on it's node IDOnmsNodegetNode(String lookupCriteria)Get a node based on it's node ID or foreignSource:foreignIdList<Integer>getNodeIdsWithIpLike(String iplike)Returns all non-deleted nodes with an IP address like the rule given.StringgetNodeLabel(int nodeId)StringgetNodeLocation(int nodeId)Get the location name associated with the node.List<OnmsNode>getNodesFromPhysaddr(String atPhysAddr)getNodesFromPhysaddrList<OnmsNode>getNodesLike(String nodeLabel)Returns all non-deleted nodes that have the given nodeLabel substring somewhere in their nodeLabel.List<OnmsNode>getNodesLike(String nodeLabel, int serviceId)getNodesLikeList<OnmsNode>getNodesLikeAndIpLike(String nodeLabel, String iplike, int serviceId)getNodesLikeAndIpLikeList<OnmsNode>getNodesWithCategories(String[] categories, boolean onlyNodesWithDownAggregateStatus)getNodesWithCategoriesList<OnmsNode>getNodesWithCategories(String[] categories1, String[] categories2, boolean onlyNodesWithDownAggregateStatus)getNodesWithCategoriesList<OnmsNode>getNodesWithIfAlias(String ifAlias)Returns all non-deleted nodes that contain the given string in an ifAliasList<OnmsNode>getNodesWithIpLike(String iplike)List<OnmsNode>getNodesWithIpLike(String iplike, int serviceId)getNodesWithIpLikeList<OnmsNode>getNodesWithPhysAddr(String macAddr)Returns all non-deleted nodes that have the given mac.List<OnmsNode>getNodesWithPhysAddrAtInterface(String macAddr)Returns all non-deleted nodes with a MAC address like the rule given from AtInterface.List<OnmsNode>getNodesWithPhysAddrFromSnmpInterface(String macAddr)Returns all non-deleted nodes with a MAC address like the rule given from SnmpInterface.List<OnmsNode>getNodesWithService(int serviceId)Returns all non-deleted nodes that have the given service.ScopegetScopeForInterface(Integer nodeId, String ipAddress)ScopegetScopeForNode(Integer nodeId)ScopegetScopeForService(Integer nodeId, InetAddress ipAddress, String serviceName)ServicegetService(int ifServiceId)Return the service specified by the node identifier, IP address, and service identifier.ServicegetService(int nodeId, String ipAddress, int serviceId)Return the service specified by the node identifier, IP address, and service identifier.intgetServiceIdFromName(String serviceName)getServiceIdFromNameMap<Integer,String>getServiceIdToNameMap()getServiceIdToNameMapStringgetServiceNameFromId(int serviceId)getServiceNameFromIdMap<String,Integer>getServiceNameToIdMap()getServiceNameToIdMapService[]getServicesOnInterface(int nodeId, String ipAddress)getServicesOnInterfaceService[]getServicesOnInterface(int nodeId, 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.InterfacegetSnmpInterface(int nodeId, int ifIndex)Get interface from snmpinterface table.booleannodeExistsInRequisition(String foreignSource, String foreignId)
-
-
-
Method Detail
-
getNodeLabel
String getNodeLabel(int nodeId)
-
getNodeLocation
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
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
OnmsNodeobject
-
getNode
OnmsNode getNode(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
OnmsNodeobject
-
getAllNodes
List<OnmsNode> getAllNodes()
Returns all non-deleted nodes.- Returns:
- an array of
OnmsNodeobjects.
-
getNodesLike
List<OnmsNode> getNodesLike(String nodeLabel)
Returns all non-deleted nodes that have the given nodeLabel substring somewhere in their nodeLabel.
-
getNodesWithService
List<OnmsNode> getNodesWithService(int serviceId)
Returns all non-deleted nodes that have the given service.- Parameters:
serviceId- a int.- Returns:
- an array of
OnmsNodeobjects.
-
getNodesWithPhysAddr
List<OnmsNode> getNodesWithPhysAddr(String macAddr)
Returns all non-deleted nodes that have the given mac.
-
getNodesWithPhysAddrAtInterface
List<OnmsNode> getNodesWithPhysAddrAtInterface(String macAddr)
Returns all non-deleted nodes with a MAC address like the rule given from AtInterface.
-
getNodesWithPhysAddrFromSnmpInterface
List<OnmsNode> getNodesWithPhysAddrFromSnmpInterface(String macAddr)
Returns all non-deleted nodes with a MAC address like the rule given from SnmpInterface.
-
getNodesWithIfAlias
List<OnmsNode> getNodesWithIfAlias(String ifAlias)
Returns all non-deleted nodes that contain the given string in an ifAlias- Parameters:
ifAlias- aStringobject.- Returns:
- nodes the nodes with a matching ifAlias on one or more interfaces
-
getHostname
String getHostname(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.
-
getInterface
Interface getInterface(int ipInterfaceId)
getInterface
- Parameters:
ipInterfaceId- a int.- Returns:
- a
Interfaceobject.
-
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(String ipAddress)
getInterfacesWithIpAddress
-
getAllInterfacesOnNode
Interface[] getAllInterfacesOnNode(int nodeId)
getAllInterfacesOnNode
- Parameters:
nodeId- a int.- Returns:
- an array of
Interfaceobjects.
-
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
Interfaceobjects.
-
getAllInterfaces
Interface[] getAllInterfaces()
getAllInterfaces
- Returns:
- an array of
Interfaceobjects.
-
getAllInterfaces
Interface[] getAllInterfaces(boolean includeSnmp)
-
getAllManagedIpInterfaces
Interface[] getAllManagedIpInterfaces(boolean includeSNMP)
getAllManagedIpInterfaces
- Parameters:
includeSNMP- a boolean.- Returns:
- an array of
Interfaceobjects.
-
getAllManagedIpInterfacesLike
Interface[] getAllManagedIpInterfacesLike(String ipHost)
Returns all managed interfaces that matches the ipHost String to either the ipHost or ipAddress field.- Parameters:
ipHost-- Returns:
- an arrau of
Interfaceobjects
-
getService
Service getService(int nodeId, 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.
-
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
Serviceobject.
-
getServicesOnInterface
Service[] getServicesOnInterface(int nodeId, String ipAddress)
getServicesOnInterface
-
getServicesOnInterface
Service[] getServicesOnInterface(int nodeId, String ipAddress, boolean includeDeletions)
getServicesOnInterface
-
getServicesOnNode
Service[] getServicesOnNode(int nodeId)
Get the list of all services on a given node.- Parameters:
nodeId- a int.- Returns:
- an array of
Serviceobjects.
-
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
Serviceobjects.
-
getServiceNameFromId
String getServiceNameFromId(int serviceId)
getServiceNameFromId
- Parameters:
serviceId- a int.- Returns:
- a
Stringobject.
-
getServiceIdFromName
int getServiceIdFromName(String serviceName)
getServiceIdFromName
- Parameters:
serviceName- aStringobject.- Returns:
- a int.
-
getServiceIdToNameMap
Map<Integer,String> getServiceIdToNameMap()
getServiceIdToNameMap
- Returns:
- a java$util$Map object.
-
getServiceNameToIdMap
Map<String,Integer> getServiceNameToIdMap()
getServiceNameToIdMap
- Returns:
- a java$util$Map object.
-
getNodesLikeAndIpLike
List<OnmsNode> getNodesLikeAndIpLike(String nodeLabel, String iplike, int serviceId)
getNodesLikeAndIpLike
-
getNodesWithIpLike
List<OnmsNode> getNodesWithIpLike(String iplike, int serviceId)
getNodesWithIpLike
-
getAllNodes
List<OnmsNode> getAllNodes(int serviceId)
getAllNodes
- Parameters:
serviceId- a int.- Returns:
- an array of
OnmsNodeobjects.
-
getNodeIdsWithIpLike
List<Integer> getNodeIdsWithIpLike(String iplike)
Returns all non-deleted nodes with an IP address like the rule given.
-
getNodesWithCategories
List<OnmsNode> getNodesWithCategories(String[] categories, boolean onlyNodesWithDownAggregateStatus)
getNodesWithCategories
- Parameters:
nodeDao- aNodeDaoobject.categoryDao- aCategoryDaoobject.categories1- an array ofStringobjects.onlyNodesWithDownAggregateStatus- a boolean.- Returns:
- an array of
OnmsNodeobjects.
-
getNodesWithCategories
List<OnmsNode> getNodesWithCategories(String[] categories1, String[] categories2, boolean onlyNodesWithDownAggregateStatus)
getNodesWithCategories
- Parameters:
nodeDao- aNodeDaoobject.categoryDao- aCategoryDaoobject.categories1- an array ofStringobjects.categories2- an array ofStringobjects.onlyNodesWithDownAggregateStatus- a boolean.- Returns:
- an array of
OnmsNodeobjects.
-
getIfIndex
Integer getIfIndex(int ipinterfaceid)
-
getMonitoringLocations
List<OnmsMonitoringLocation> getMonitoringLocations()
-
getMonitoringSystems
List<OnmsMonitoringSystem> getMonitoringSystems()
-
currentOutagesForServiceFromPerspectivePoller
Collection<OnmsOutage> currentOutagesForServiceFromPerspectivePoller(OnmsMonitoredService service)
Return all current open outages for the given service be it detected from local or from perspective.
-
getAllApplications
List<OnmsApplication> getAllApplications()
-
getApplicationStatus
ApplicationStatus getApplicationStatus(OnmsApplication onmsApplication, long start, long end)
-
getApplicationServiceStatus
Map<OnmsMonitoredService,Map<String,Double>> getApplicationServiceStatus(OnmsApplication onmsApplication, long start, long end)
-
getScopeForService
Scope getScopeForService(Integer nodeId, InetAddress ipAddress, String serviceName)
-
-