@Transactional(readOnly=true) public class NetworkElementFactory extends Object implements org.springframework.beans.factory.InitializingBean, NetworkElementFactoryInterface
| Modifier and Type | Class and Description |
|---|---|
static class |
NetworkElementFactory.InterfaceComparator |
| Constructor and Description |
|---|
NetworkElementFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
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)
getActiveInterfacesOnNode
|
List<OnmsApplication> |
getAllApplications() |
Interface[] |
getAllInterfaces()
getAllInterfaces
|
Interface[] |
getAllInterfaces(boolean includeSnmp) |
Interface[] |
getAllInterfacesOnNode(int nodeId)
getAllInterfacesOnNode
|
Interface[] |
getAllManagedIpInterfaces(boolean includeSNMP)
getAllManagedIpInterfaces
|
Interface[] |
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)
getAllNodes
|
Service[] |
getAllServices()
getAllServices
|
Interface[] |
getAllSnmpInterfacesOnNode(int nodeId)
Returns all SNMP interfaces on a node
|
Map<OnmsMonitoredService,Map<String,Double>> |
getApplicationServiceStatus(OnmsApplication onmsApplication,
long start,
long end) |
ApplicationStatus |
getApplicationStatus(OnmsApplication onmsApplication,
long start,
long end) |
List<String> |
getCategories() |
String |
getHostname(String ipAddress)
Resolve an IP address to a DNS hostname via the database.
|
Integer |
getIfIndex(int ipinterfaceid) |
Integer |
getIfIndex(int nodeID,
String ipaddr) |
static NetworkElementFactoryInterface |
getInstance(org.springframework.context.ApplicationContext appContext) |
static NetworkElementFactoryInterface |
getInstance(javax.servlet.ServletContext servletContext) |
Interface |
getInterface(int ipInterfaceId)
getInterface
|
Interface |
getInterface(int nodeId,
String ipAddress)
getInterface
|
Interface |
getInterface(int nodeId,
String ipAddress,
int ifIndex)
getInterface
|
Interface[] |
getInterfacesWithIfAlias(int nodeId,
String ifAlias) |
Interface[] |
getInterfacesWithIpAddress(String ipAddress)
getInterfacesWithIpAddress
|
String |
getIpPrimaryAddress(int nodeId)
Find the IP address of the primary SNMP interface.
|
List<OnmsMonitoringLocation> |
getMonitoringLocations() |
List<OnmsMonitoringSystem> |
getMonitoringSystems() |
OnmsNode |
getNode(int nodeId)
Get a node based on it's node ID
|
OnmsNode |
getNode(String lookupCriteria)
Get a node based on it's node ID or foreignSource:foreignId
|
List<Integer> |
getNodeIdsWithIpLike(String iplike)
Returns all non-deleted nodes with an IP address like the rule given.
|
String |
getNodeLabel(int nodeId) |
String |
getNodeLocation(int nodeId)
Get the location name associated with the node.
|
List<OnmsNode> |
getNodesFromPhysaddr(String physAddr)
getNodesFromPhysaddr
|
List<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)
getNodesLike
|
List<OnmsNode> |
getNodesLikeAndIpLike(String nodeLabel,
String iplike,
int serviceId)
getNodesLikeAndIpLike
|
List<OnmsNode> |
getNodesWithCategories(String[] categories,
boolean onlyNodesWithDownAggregateStatus)
getNodesWithCategories
|
List<OnmsNode> |
getNodesWithCategories(String[] categories1,
String[] categories2,
boolean onlyNodesWithDownAggregateStatus)
getNodesWithCategories
|
List<OnmsNode> |
getNodesWithIfAlias(String ifAlias)
Returns all non-deleted nodes that contain the given string in an ifAlias
|
List<OnmsNode> |
getNodesWithIpLike(String iplike) |
List<OnmsNode> |
getNodesWithIpLike(String iplike,
int serviceId)
getNodesWithIpLike
|
List<OnmsNode> |
getNodesWithPhysAddr(String macAddr)
Returns all non-deleted nodes that have the given mac.
|
List<OnmsNode> |
getNodesWithPhysAddrAtInterface(String macAddr)
Deprecated.
OnmsNode.arpInterface went away, so we only search snmpInterfaces
|
List<OnmsNode> |
getNodesWithPhysAddrFromSnmpInterface(String macAddr)
Deprecated.
OnmsNode.arpInterface went away, so we only search snmpInterfaces
|
List<OnmsNode> |
getNodesWithService(int serviceId)
Returns all non-deleted nodes that have the given service.
|
Service |
getService(int ifServiceId)
Return the service specified by the node identifier, IP address, and
service identifier.
|
Service |
getService(int nodeId,
String ipAddress,
int serviceId)
Return the service specified by the node identifier, IP address, and
service identifier.
|
int |
getServiceIdFromName(String serviceName)
getServiceIdFromName
|
Map<Integer,String> |
getServiceIdToNameMap()
getServiceIdToNameMap
|
String |
getServiceNameFromId(int serviceId)
getServiceNameFromId
|
Map<String,Integer> |
getServiceNameToIdMap()
getServiceNameToIdMap
|
Service[] |
getServicesOnInterface(int nodeId,
String ipAddress)
getServicesOnInterface
|
Service[] |
getServicesOnInterface(int nodeId,
String ipAddress,
boolean includeDeletions)
getServicesOnInterface
|
Service[] |
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(String foreignSource,
String foreignId) |
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic static NetworkElementFactoryInterface getInstance(javax.servlet.ServletContext servletContext)
public static NetworkElementFactoryInterface getInstance(org.springframework.context.ApplicationContext appContext)
public String getNodeLabel(int nodeId)
getNodeLabel in interface NetworkElementFactoryInterfacepublic String getNodeLocation(int nodeId)
NetworkElementFactoryInterfacegetNodeLocation in interface NetworkElementFactoryInterfacenodeId - the node's IDpublic String getIpPrimaryAddress(int nodeId)
NetworkElementFactoryInterfacegetIpPrimaryAddress in interface NetworkElementFactoryInterfacenodeId - an int.public OnmsNode getNode(int nodeId)
NetworkElementFactoryInterfacegetNode in interface NetworkElementFactoryInterfacenodeId - an intOnmsNode objectpublic OnmsNode getNode(String lookupCriteria)
NetworkElementFactoryInterfacegetNode in interface NetworkElementFactoryInterfacelookupCriteria - the criteria, either the node ID, or a colon-separated string of foreignSource:foreignIdOnmsNode objectpublic List<OnmsNode> getAllNodes()
NetworkElementFactoryInterfacegetAllNodes in interface NetworkElementFactoryInterfaceOnmsNode objects.public List<OnmsNode> getNodesLike(String nodeLabel)
NetworkElementFactoryInterfacegetNodesLike in interface NetworkElementFactoryInterfacenodeLabel - a String object.OnmsNode objects.public List<OnmsNode> getNodesWithIpLike(String iplike)
getNodesWithIpLike in interface NetworkElementFactoryInterfacepublic List<OnmsNode> getNodesWithService(int serviceId)
NetworkElementFactoryInterfacegetNodesWithService in interface NetworkElementFactoryInterfaceserviceId - a int.OnmsNode objects.public List<OnmsNode> getNodesWithPhysAddr(String macAddr)
NetworkElementFactoryInterfacegetNodesWithPhysAddr in interface NetworkElementFactoryInterfacemacAddr - a String object.OnmsNode objects.public List<OnmsNode> getNodesWithPhysAddrAtInterface(String macAddr)
NetworkElementFactoryInterfacegetNodesWithPhysAddrAtInterface in interface NetworkElementFactoryInterfacemacAddr - public List<OnmsNode> getNodesWithPhysAddrFromSnmpInterface(String macAddr)
NetworkElementFactoryInterfacegetNodesWithPhysAddrFromSnmpInterface in interface NetworkElementFactoryInterfacemacAddr - public List<OnmsNode> getNodesWithIfAlias(String ifAlias)
NetworkElementFactoryInterfacegetNodesWithIfAlias in interface NetworkElementFactoryInterfaceifAlias - a String object.public String getHostname(String ipAddress)
NetworkElementFactoryInterfacegetHostname in interface NetworkElementFactoryInterfaceipAddress - a String object.String object.public Integer getIfIndex(int ipinterfaceid)
getIfIndex in interface NetworkElementFactoryInterfacepublic Integer getIfIndex(int nodeID, String ipaddr)
getIfIndex in interface NetworkElementFactoryInterfacepublic Interface getInterface(int ipInterfaceId)
NetworkElementFactoryInterfacegetInterface
getInterface in interface NetworkElementFactoryInterfaceipInterfaceId - a int.Interface object.public Interface getInterface(int nodeId, String ipAddress)
NetworkElementFactoryInterfacegetInterface
getInterface in interface NetworkElementFactoryInterfacenodeId - a int.ipAddress - a String object.Interface object.public Interface getInterface(int nodeId, String ipAddress, int ifIndex)
NetworkElementFactoryInterfacegetInterface
getInterface in interface NetworkElementFactoryInterfacenodeId - a int.ipAddress - a String object.Interface object.public Interface getSnmpInterface(int nodeId, int ifIndex)
NetworkElementFactoryInterfacegetSnmpInterface in interface NetworkElementFactoryInterfacenodeId - a int.ifIndex - a int.public Interface[] getInterfacesWithIpAddress(String ipAddress)
NetworkElementFactoryInterfacegetInterfacesWithIpAddress
getInterfacesWithIpAddress in interface NetworkElementFactoryInterfaceipAddress - a String object.Interface objects.public Interface[] getInterfacesWithIfAlias(int nodeId, String ifAlias)
getInterfacesWithIfAlias in interface NetworkElementFactoryInterfacepublic Interface[] getAllInterfacesOnNode(int nodeId)
NetworkElementFactoryInterfacegetAllInterfacesOnNode
getAllInterfacesOnNode in interface NetworkElementFactoryInterfacenodeId - a int.Interface objects.public Interface[] getAllSnmpInterfacesOnNode(int nodeId)
NetworkElementFactoryInterfacegetAllSnmpInterfacesOnNode in interface NetworkElementFactoryInterfacenodeId - a int.public Interface[] getActiveInterfacesOnNode(int nodeId)
NetworkElementFactoryInterfacegetActiveInterfacesOnNode
getActiveInterfacesOnNode in interface NetworkElementFactoryInterfacenodeId - a int.Interface objects.public Interface[] getAllInterfaces()
NetworkElementFactoryInterfacegetAllInterfaces
getAllInterfaces in interface NetworkElementFactoryInterfaceInterface objects.public Interface[] getAllInterfaces(boolean includeSnmp)
getAllInterfaces in interface NetworkElementFactoryInterfacepublic Interface[] getAllManagedIpInterfaces(boolean includeSNMP)
NetworkElementFactoryInterfacegetAllManagedIpInterfaces
getAllManagedIpInterfaces in interface NetworkElementFactoryInterfaceincludeSNMP - a boolean.Interface objects.public Interface[] getAllManagedIpInterfacesLike(String ipHost)
NetworkElementFactoryInterfacegetAllManagedIpInterfacesLike in interface NetworkElementFactoryInterfaceInterface objectspublic Service getService(int nodeId, String ipAddress, int serviceId)
NetworkElementFactoryInterfaceNote 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 in interface NetworkElementFactoryInterfacenodeId - a int.ipAddress - a String object.serviceId - a int.Service object.public Service getService(int ifServiceId)
NetworkElementFactoryInterfaceNote 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 in interface NetworkElementFactoryInterfaceifServiceId - a int.Service object.public Service[] getAllServices()
NetworkElementFactoryInterfacegetAllServices
getAllServices in interface NetworkElementFactoryInterfaceService objects.public Service[] getServicesOnInterface(int nodeId, String ipAddress)
NetworkElementFactoryInterfacegetServicesOnInterface
getServicesOnInterface in interface NetworkElementFactoryInterfacenodeId - a int.ipAddress - a String object.Service objects.public Service[] getServicesOnInterface(int nodeId, String ipAddress, boolean includeDeletions)
NetworkElementFactoryInterfacegetServicesOnInterface
getServicesOnInterface in interface NetworkElementFactoryInterfacenodeId - a int.ipAddress - a String object.includeDeletions - a boolean.Service objects.public Service[] getServicesOnNode(int nodeId)
NetworkElementFactoryInterfacegetServicesOnNode in interface NetworkElementFactoryInterfacenodeId - a int.Service objects.public Service[] getServicesOnNode(int nodeId, int serviceId)
NetworkElementFactoryInterfacegetServicesOnNode in interface NetworkElementFactoryInterfacenodeId - a int.serviceId - a int.Service objects.public String getServiceNameFromId(int serviceId)
NetworkElementFactoryInterfacegetServiceNameFromId
getServiceNameFromId in interface NetworkElementFactoryInterfaceserviceId - a int.String object.public int getServiceIdFromName(String serviceName)
NetworkElementFactoryInterfacegetServiceIdFromName
getServiceIdFromName in interface NetworkElementFactoryInterfaceserviceName - a String object.public Map<Integer,String> getServiceIdToNameMap()
NetworkElementFactoryInterfacegetServiceIdToNameMap
getServiceIdToNameMap in interface NetworkElementFactoryInterfacepublic Map<String,Integer> getServiceNameToIdMap()
NetworkElementFactoryInterfacegetServiceNameToIdMap
getServiceNameToIdMap in interface NetworkElementFactoryInterfacepublic List<OnmsNode> getNodesLikeAndIpLike(String nodeLabel, String iplike, int serviceId)
NetworkElementFactoryInterfacegetNodesLikeAndIpLike
getNodesLikeAndIpLike in interface NetworkElementFactoryInterfacenodeLabel - a String object.iplike - a String object.serviceId - a int.OnmsNode objects.public List<OnmsNode> getNodesLike(String nodeLabel, int serviceId)
NetworkElementFactoryInterfacegetNodesLike
getNodesLike in interface NetworkElementFactoryInterfacenodeLabel - a String object.serviceId - a int.OnmsNode objects.public List<OnmsNode> getNodesWithIpLike(String iplike, int serviceId)
NetworkElementFactoryInterfacegetNodesWithIpLike
getNodesWithIpLike in interface NetworkElementFactoryInterfaceiplike - a String object.serviceId - a int.OnmsNode objects.public List<OnmsNode> getAllNodes(int serviceId)
NetworkElementFactoryInterfacegetAllNodes
getAllNodes in interface NetworkElementFactoryInterfaceserviceId - a int.OnmsNode objects.public List<OnmsNode> getNodesFromPhysaddr(String physAddr)
NetworkElementFactoryInterfacegetNodesFromPhysaddr
getNodesFromPhysaddr in interface NetworkElementFactoryInterfacephysAddr - a String object.OnmsNode objects.public List<Integer> getNodeIdsWithIpLike(String iplike)
NetworkElementFactoryInterfacegetNodeIdsWithIpLike in interface NetworkElementFactoryInterfaceiplike - a String object.List object.public List<OnmsNode> getNodesWithCategories(String[] categories, boolean onlyNodesWithDownAggregateStatus)
NetworkElementFactoryInterfacegetNodesWithCategories
getNodesWithCategories in interface NetworkElementFactoryInterfaceonlyNodesWithDownAggregateStatus - a boolean.OnmsNode objects.public List<OnmsNode> getNodesWithCategories(String[] categories1, String[] categories2, boolean onlyNodesWithDownAggregateStatus)
NetworkElementFactoryInterfacegetNodesWithCategories
getNodesWithCategories in interface NetworkElementFactoryInterfacecategories1 - an array of String objects.categories2 - an array of String objects.onlyNodesWithDownAggregateStatus - a boolean.OnmsNode objects.public List<OnmsMonitoringLocation> getMonitoringLocations()
getMonitoringLocations in interface NetworkElementFactoryInterfacepublic List<OnmsMonitoringSystem> getMonitoringSystems()
getMonitoringSystems in interface NetworkElementFactoryInterfacepublic boolean nodeExistsInRequisition(String foreignSource, String foreignId)
nodeExistsInRequisition in interface NetworkElementFactoryInterfacepublic List<String> getCategories()
getCategories in interface NetworkElementFactoryInterfacepublic Collection<OnmsOutage> currentOutagesForServiceFromPerspectivePoller(OnmsMonitoredService service)
NetworkElementFactoryInterfacecurrentOutagesForServiceFromPerspectivePoller in interface NetworkElementFactoryInterfacepublic List<OnmsApplication> getAllApplications()
getAllApplications in interface NetworkElementFactoryInterfacepublic ApplicationStatus getApplicationStatus(OnmsApplication onmsApplication, long start, long end)
getApplicationStatus in interface NetworkElementFactoryInterfacepublic Map<OnmsMonitoredService,Map<String,Double>> getApplicationServiceStatus(OnmsApplication onmsApplication, long start, long end)
getApplicationServiceStatus in interface NetworkElementFactoryInterfaceCopyright © 2021. All rights reserved.