Skip to main content

I am running a custom command(show interface status) against all Cisco Nexus routers which will show the interface hardware SFP type.

How do I get this SFP info through NQE? I am not getting the SPF printed, tried multiple was. Can anyone help me on this.

 

foreach cliCommandResponse in endpoint.cliCommandResponses

cliCommandResponse.command == "show interface status"

select {

endpointName: endpoint.name,

command: cliCommandResponse.command,

response: cliCommandResponse.response

}

 

are you looking for the part#? 

I used the built in components instead of show interface. 

foreach device in network.devices

let platform = device.platform

foreach component in platform.components

where component.partType == DevicePartType.TRANSCEIVER

select {
deviceName: device.name,
componentName: component.name,
PID: component.partId,
serialNumber: component.serialNumber,
model: device.platform.model,
OS: device.platform.osVersion,
}

As for the media type I ended up using the PIDs and a lookup table in Excel.


if you are looking for specific transceivers, also check out AricaFN’s answer for a question I had looking for 100Mbps fiber transceivers:

 

 


Reply