Netsight Flexview rows
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎05-20-2016 02:00 PM
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
ReqID
OID::ReqID:::SNMP::ReqID
IP Address
OID::IP Address:::SNMP::IP Address
Instance
OID::Instance:::SNMP::Instance
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
OID::entPhysicalSerialNum:::SNMP::SNMPW;false;4;5;true;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 }
"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 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎09-13-2016 09:01 AM
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
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎05-24-2016 05:03 PM
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.
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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎05-24-2016 05:03 PM
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
-Drew
