1 Reply Latest reply on Oct 3, 2016 11:50 AM by sja

    Cisco switch interface count report

    thlarsen

      Hi, We would like to make report where we could se the interfaces in our switches. But we don't whant virtual, fastethernet0, Null0, other or loop.

      But the report keep adding the FastEthernet0 from the switches where we have this interface!

      I have added the the SQL script. Is it the wrong interface type name?

       

      SELECT COUNT(InterfaceDescription) AS NumPorts, N.Caption 

      FROM NCM.Interfaces I JOIN Orion.Nodes N ON (I.Node.CoreNodeID = N.NodeID) 

      JOIN Orion.NodesCustomProperties AS NCP ON N.NodeID=NCP.NodeID 

      WHERE NOT ((InterfaceTypeName like '%Virtual%')  OR (InterfaceTypeName = '%FastEthernet0%') OR (InterfaceTypeName = '%Null0%') OR (InterfaceTypeName = 'other') OR (InterfaceTypeName like '%loop%'))  AND NCP.Equipment_Type='SWITCHES' 

      GROUP BY N.NodeID, N.Caption 

      ORDER BY NumPorts DESC

       

      Thanks

      Tyge H. Larsen