Netsight Flexview rows

  • 1
  • 1
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)

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:

<?xml version="1.0" encoding="UTF-8"?>
<flextablelist version="6.3.0.174">
    <flextable filterKey="NA" autoExportFileManagement="Replace" autoExportCsvFieldDelimiter="Comma" rowSelectionAllowed="false" autoExportFrequencyUnit="Minutes" class="com.enterasys.netsight.console.client.flexview.FvTable" columnSelectionAllowed="false" autoExportFilename="" autoExportAllowed="false" autoExportFormat="HTML" filterShown="true" id="New_device_serial_number.tpl" filterOptions="{0, 4}" highlightBackground="153,255,255,255" autoCreateColumnsFromModel="false" showHorizontalLines="true" autoExportCsvTextDelineation="DQUOTE">New_device_serial_number.tpl
        <tableModel>com.ets.nac.tables.TbModel</tableModel>
        <column comparator="com.ets.flextable.col.IntStringComparator" id="0" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" fixed="true" hidden="true">ReqID
            <notes></notes>
            <dataField>OID::ReqID:::SNMP::ReqID</dataField></column>
        <column comparator="com.ets.nac.tables.TbCompOid" id="1" sortOrder="ascending" class="com.enterasys.netsight.console.client.flexview.FvColumn" fixed="true" sorted="true" modelIndex="1">IP Address
            <notes></notes>
            <dataField>OID::IP Address:::SNMP::IP Address</dataField></column>
        <column comparator="com.ets.nac.tables.TbCompOid" id="2" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" fixed="true" hidden="true" modelIndex="2">Instance
            <notes></notes>
            <dataField>OID::Instance:::SNMP::Instance</dataField></column>
        <column comparator="com.ets.flextable.col.VarStringComparator" id="106" width="219" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" modelIndex="3">Name
            <notes></notes>
            <dataField>OID::sysName:::SNMP::SNMPW;true;15;3;true;false;1;2;0;0;0;0;0</dataField></column>
        <column comparator="com.ets.flextable.col.VarStringComparator" id="100" width="196" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" modelIndex="4">Model Name
            <notes></notes>
            <dataField>OID::entPhysicalModelName:::SNMP::SNMP;false;4;4;false;false;4;2;0;0;0;0;0</dataField></column>
        <column comparator="com.ets.flextable.col.VarStringComparator" id="101" width="298" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" hidden="true" modelIndex="5">Serial
            <notes></notes>
            <dataField>OID::entPhysicalSerialNum:::SNMP::SNMPW;false;4;5;true;false;4;2;0;0;0;0;0</dataField></column>
        <column comparator="com.ets.nac.tables.TbCompExpression" id="102" width="222" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" filtered="true" cellRenderer="com.ets.nac.tables.TbRendNoIconExpression" modelIndex="6">Serial Number
            <notes></notes>
            <dataField>SNMP::EXPR;true;2;6;false;false;1;2;0;0;0;0;0</dataField></column>
        <column comparator="com.ets.nac.tables.TbCompExpression" id="104" width="221" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" cellRenderer="com.ets.nac.tables.TbRendNoIconExpression" modelIndex="7">Date code
            <notes></notes>
            <dataField>SNMP::EXPR;true;2;7;false;false;1;2;0;0;0;0;0</dataField></column>
        <column comparator="com.ets.flextable.col.VarStringComparator" id="103" width="550" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" modelIndex="8">sysLocation
            <notes></notes>
            <dataField>OID::sysLocation:::SNMP::SNMPW;true;15;8;true;false;2;2;0;0;0;0;0</dataField></column>
        <column comparator="com.ets.flextable.col.VarStringComparator" id="105" width="77" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" modelIndex="9">Switch_Type
            <notes></notes>
            <dataField>OID::entPhysicalDescr:::SNMP::SNMP;false;4;9;false;false;4;2;0;0;0;0;0</dataField></column>
        <column comparator="com.ets.flextable.col.VarStringComparator" id="107" width="80" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" modelIndex="10">Slot_ID
            <notes></notes>
            <dataField>OID::extremeSlotName:::SNMP::SNMP;false;15;10;false;false;4;2;0;0;0;0;0</dataField></column>
        <notes></notes>
        <dataField>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 }</dataField></flextable></flextablelist>

Photo of craymond

craymond

  • 608 Points 500 badge 2x thumb

Posted 2 years ago

  • 1
  • 1
Photo of craymond

craymond

  • 608 Points 500 badge 2x thumb
Official Response

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] - 8)
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.