cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

report with Interface's IP Addresses

I am trying to create a report in NMP 12 that has Interface's IP Addresses along with MACs and their speeds. I have not been able to find it in Interface's variables but there must be one that gives the IP addresses because I can see them in network tab.

Does anyone have the same problem?

 

 

 

Labels (1)
0 Kudos
7 Replies
Level 10

Hi @raymond.chen ,

Are these the types of results you're looking for?

IP_and_MAC_on_node.png

Level 7

Yes.

Can be configured on the web interface

THX.

0 Kudos
Level 10

Hi @raymond.chen,

Sorry for the long delay. Yes, this can be executed in the Web-based report. You'll need to use custom SWQL.

Here are the steps:
1. Write a query. The columns listed in the 'SELECT' statement will be what is available in the report. (examples at the end)

2. Create a 'Custom Table' type Report.

001.png

 

3. Change the 'Selection method' to 'Advanced Database Query (SQL, SWQL)' and paste your query into the query box

002.png4. Add columns

003.png

 

The columns are specified by the queryThe columns are specified by the queryNOTE: if you include certain columns, sometimes you need to remove a 'Display setting', like this:

005a.png5. Rearrange or change display names of columns as appropriate.

005b.png

 

6. Finish the report as normal.

006.png

 

Example queries:

SELECT
    N.Caption,
    N.IP_Address AS [Node IP],
    N.Vendor,
    N.MachineType,
    NIPA.IPAddress,
    NPMI.PhysicalAddress,
    NPMI.Name AS [Interface Name],
    NIPA.SubnetMask
FROM Orion.NodeIPAddresses NIPA
INNER JOIN Orion.NPM.Interfaces NPMI
ON NIPA.NodeID = NPMI.NodeID AND NIPA.InterfaceIndex = NPMI.InterfaceIndex
INNER JOIN Orion.Nodes N
ON NIPA.NodeID = N.NodeID
ORDER BY N.Caption ASC, NIPA.InterfaceIndex ASC

 

This example includes custom properties:

SELECT
    N.Caption,
    N.IP_Address AS [Node IP],
    NCP.Comments,
    N.Vendor,
    N.MachineType,
    NIPA.IPAddress,
    NPMI.PhysicalAddress,
    NPMI.Name AS [Interface Name],
    NIPA.SubnetMask
FROM Orion.NodeIPAddresses NIPA
INNER JOIN Orion.NPM.Interfaces NPMI
ON NIPA.NodeID = NPMI.NodeID AND NIPA.InterfaceIndex = NPMI.InterfaceIndex
INNER JOIN Orion.Nodes N
ON NIPA.NodeID = N.NodeID
INNER JOIN Orion.NodesCustomProperties NCP
ON N.NodeID = NCP.NodeID
ORDER BY N.Caption ASC, NIPA.InterfaceIndex ASC
0 Kudos
Level 10

Hi @raymond.chen ,

I'm assuming that you're looking for something that gets you data like this:

IP_and_MAC_on_node.png

 

 

 

 

 

 

In the screenshot you'll see that I used the "WHERE NodeID = ####" to limit the results to a single node.  You could limit by other details, or not use the WHERE clause at all to get all IP/MAC address on all nodes.  You'll also see that this is giving interfaces which don't have a MAC address.  This will also exclude any interfaces which do not have an IP address configured.

 

I did this in SWQL studio, If you want to do this in a regular webreport, you can probably just look for the column names, or use this query in a "Custom Table" and "Advanced Database Query (SQL,SWQL)" configuration.

 

If this is what you were looking for, here's the query I used:

 

 

SELECT
    N.Caption,
    N.Vendor,
    N.MachineType,
    NIPA.NodeID,
    NIPA.IPAddress,
    NPMI.PhysicalAddress,
    NPMI.Name,
    NIPA.InterfaceIndex,
    NIPA.SubnetMask
FROM Orion.NodeIPAddresses NIPA
INNER JOIN Orion.NPM.Interfaces NPMI
ON NIPA.NodeID=NPMI.NodeID AND NIPA.InterfaceIndex=NPMI.InterfaceIndex
INNER JOIN Orion.Nodes N
ON NIPA.NodeID=N.NodeID
WHERE NIPA.NodeID = 1551

 

 

 It might be possible to get the MAC addresses of interfaces which don't have an IP Address assigned.  I would need to try to reorder the query and see if that changes anything.

0 Kudos
Level 16

This should be the variable

${N=SwisEntity;M=Node.IP_Address}

neomatrix1217_0-1585757330995.png

 

 

0 Kudos
Level 7

I want to select interface ip instead of node ip.

0 Kudos

when you search for IP there should be several variations of IP available, I believe the one that reads like this "IPAddresses" is the one you want

0 Kudos