Header Only - DO NOT REMOVE - Extreme Networks

Netsight Flexview rows


Userlevel 2
I am trying to create a flexview that contains the IP address, Model #, Serial #, Manufacture date, location, switch type and slot id. I have successfully gotten the all of the columns except for the slot ID to work. I have tried to use entPhysicalDescr which contains the slot number, and extremeSlotNumber & extremeSlotName which also contains the information. But when it is run, the slot numbers do not correspond. the tpl is as follows:



New_device_serial_number.tpl
com.ets.nac.tables.TbModel

IP Address

OID::IP Address:::SNMP::IP Address


Name

OID::sysName:::SNMP::SNMPW;true;15;3;true;false;1;2;0;0;0;0;0

Model Name

OID::entPhysicalModelName:::SNMP::SNMP;false;4;4;false;false;4;2;0;0;0;0;0


Serial Number

SNMP::EXPR;true;2;6;false;false;1;2;0;0;0;0;0

Date code

SNMP::EXPR;true;2;7;false;false;1;2;0;0;0;0;0

sysLocation

OID::sysLocation:::SNMP::SNMPW;true;15;8;true;false;2;2;0;0;0;0;0

Switch_Type

OID::entPhysicalDescr:::SNMP::SNMP;false;4;9;false;false;4;2;0;0;0;0;0

Slot_ID

OID::extremeSlotName:::SNMP::SNMP;false;15;10;false;false;4;2;0;0;0;0;0


TBLHASH::::TBLHDR::0;0;true;30;None;V.0.3.3.0;0;0;108:::IDS_Y_AXIS_LABEL::% Utilization::::GEMHASH::::00001:Date code::routine 104 serial=({ "Serial":101:[$] } );
"20" + substring(serial[0],0,2) + " Week " + substring(serial[0],2,4);:::00000:Serial Number::routine 102 if { "Serial":101 } == "" then
BlueText("NA")
else if { "Serial":101 } == "-" then
BlueText("NA")
else if { "Serial":101 } == "N/A" then
BlueText("NA")
else { "Serial":101 }

3 replies

Userlevel 2
So I figured out a working solution:

I used the Instance column and created the following expression=

row=({ "Instance":2:[$] } );
IF row[0] == 1 THEN "Stack"
ELSE IF row[0] == 3 THEN "Slot-" + (row[0] - 2)
ELSE IF row[0] == 5 THEN "Slot-" + (row[0] - 3)
ELSE IF row[0] == 7 THEN "Slot-" + (row[0] - 4)
ELSE IF row[0] == 9 THEN "Slot-" + (row[0] - 5)
ELSE IF row[0] == 11 THEN "Slot-" + (row[0] - 6)
ELSE IF row[0] == 13 THEN "Slot-" + (row[0] - 7)
ELSE IF row[0] == 15 THEN "Slot-" + (row[0] - 😎
ELSE IF row[0] == 17 THEN "Slot-" + (row[0] - 9)
ELSE IF row[0] == 19 THEN "Slot-" + (row[0] - 10)
ELSE IF row[0] == 21 THEN "Slot-" + (row[0] - 11)
else "N/A"

This gives the slot number for each of the members.
Userlevel 7
craymond wrote:

So I figured out a working solution:

I used the Instance column and created the following expression=

row=({ "Instance":2:[$] } );
IF row[0] == 1 THEN "Stack"
ELSE IF row[0] == 3 THEN "Slot-" + (row[0] - 2)
ELSE IF row[0] == 5 THEN "Slot-" + (row[0] - 3)
ELSE IF row[0] == 7 THEN "Slot-" + (row[0] - 4)
ELSE IF row[0] == 9 THEN "Slot-" + (row[0] - 5)
ELSE IF row[0] == 11 THEN "Slot-" + (row[0] - 6)
ELSE IF row[0] == 13 THEN "Slot-" + (row[0] - 7)
ELSE IF row[0] == 15 THEN "Slot-" + (row[0] - 😎
ELSE IF row[0] == 17 THEN "Slot-" + (row[0] - 9)
ELSE IF row[0] == 19 THEN "Slot-" + (row[0] - 10)
ELSE IF row[0] == 21 THEN "Slot-" + (row[0] - 11)
else "N/A"

This gives the slot number for each of the members.

It seems the community may have let you down on this one. Thanks for coming back to post a solution for others who may have the same question!

-Drew
Hi Crymond,

could you attach the final version of the flexview code?

I'm trying to do s script to view netlogin enabled port associated to switch type (or slot type) and slot number.

Thank you very much

Reply