Port_Status_Time_with_alias com.ets.nac.tables.TbModel IP Address OID::IP Address:::SNMP::IP Address Name OID::sysName:::SNMP::SNMPW;true;15;3;true;false;2;2;0;0;0;0;0 Location OID::sysLocation:::SNMP::SNMPW;true;15;4;true;false;2;2;0;0;0;0;0 Interface Name SNMP::EXPR;true;15;5;false;false;1;2;0;0;0;0;0 Port Alias OID::ifAlias:::SNMP::SNMPW;false;15;7;true;false;5;2;0;0;0;0;0 Time in Current State SNMP::EXPR;true;15;10;false;false;1;2;0;0;0;0;0 Current Operational Mode SNMP::EXPR;true;15;15;false;false;1;2;0;0;0;0;0 TBLHASH::::IDS_GRAPH_COLUMNS::102:::IDS_GRAPH_TYPE::0:::IDS_GRAPH_AUTO_EXPORT_TYPE::0:::TBLHDR::0;0;true;0;ifEntry;V.0.3.3.0;0;0;114::::GEMHASH::::00001:Interface Name::routine 109 if ({ "Port Name":105 } == "-" || { "Port Name":105 } == "") then ({ "ifIndex":107 } + " -- " + { "ifDescr":108 } ) else { "Port Name":105 }:::00000:Time in Current State::routine 102 timea = Timeticks({ "sysUpTime":100 }); timeb = Timeticks({ "ifLastChange":101 }); if (timea - timeb) < 0 then time = ((timea-timeb)+4294967296) else time = (timea-timeb); timedays = time / 8640000; if (timedays <= 7) && ({ "Current Operational Status":104:$ } == "down") Then (FormatTime(time) + " in down state") else if (timedays <= 14) && ({ "Current Operational Status":104:$ } == "down") Then Bluetext (FormatTime(time) + " in down state") else if (timedays <= 21) && ({ "Current Operational Status":104:$ } == "down") Then Yellowtext (FormatTime(time) + " in down state") else if (timedays > 21) && ({ "Current Operational Status":104:$ } == "down") Then Redtext (FormatTime(time) + " in down state") else if (timedays <= 7) && ({ "Current Operational Status":104:$ } == "testing") Then Greentext (FormatTime(time) + " in testing state") else if (timedays <= 14) && ({ "Current Operational Status":104:$ } == "testing") Then Bluetext (FormatTime(time) + " in testing state") else if (timedays <= 21) && ({ "Current Operational Status":104:$ } == "testing") Then Yellowtext (FormatTime(time) + " in testing state") else if (timedays > 21) && ({ "Current Operational Status":104:$ } == "testing") Then Redtext (FormatTime(time) + " in testing state") else if (timedays <= 7) && ({ "Current Operational Status":104:$ } == "unknown") Then Greentext (FormatTime(time) + " in unknown state") else if (timedays <= 14) && ({ "Current Operational Status":104:$ } == "unknown") Then Bluetext (FormatTime(time) + " in unknown state") else if (timedays <= 21) && ({ "Current Operational Status":104:$ } == "unknown") Then Yellowtext (FormatTime(time) + " in unknown state") else if (timedays > 21) && ({ "Current Operational Status":104:$ } == "unknown") Then Redtext (FormatTime(time) + " in unknown state") else if (timedays <= 7) && ({ "Current Operational Status":104:$ } == "dormant") Then Greentext (FormatTime(time) + " in dormant state") else if (timedays <= 14) && ({ "Current Operational Status":104:$ } == "dormant") Then Bluetext (FormatTime(time) + " in dormant state") else if (timedays <= 21) && ({ "Current Operational Status":104:$ } == "dormant") Then Yellowtext (FormatTime(time) + " in dormant state") else if (timedays > 21) && ({ "Current Operational Status":104:$ } == "dormant") Then Redtext (FormatTime(time) + " in dormant state") else if (timedays <= 7) && ({ "Current Operational Status":104:$ } == "notPresent") Then Greentext (FormatTime(time) + " in notPresent state") else if (timedays <= 14) && ({ "Current Operational Status":104:$ } == "notPresent") Then Bluetext (FormatTime(time) + " in notPresent state") else if (timedays <= 21) && ({ "Current Operational Status":104:$ } == "notPresent") Then Yellowtext (FormatTime(time) + " in notPresent state") else if (timedays > 21) && ({ "Current Operational Status":104:$ } == "notPresent") Then Redtext (FormatTime(time) + " in notPresent state") else if (timedays <= 7) && ({ "Current Operational Status":104:$ } == "lowerLayerDown") Then Greentext (FormatTime(time) + " in lowerLayerDown state") else if (timedays <= 14) && ({ "Current Operational Status":104:$ } == "lowerLayerDown") Then Bluetext (FormatTime(time) + " in lowerLayerDown state") else if (timedays <= 21) && ({ "Current Operational Status":104:$ } == "lowerLayerDown") Then Yellowtext (FormatTime(time) + " in lowerLayerDown state") else if (timedays > 21) && ({ "Current Operational Status":104:$ } == "lowerLayerDown") Then Redtext (FormatTime(time) + " in lowerLayerDown state") else if { "Current Operational Status":104:$ } == "up" Then GreenText (FormatTime(time) + " in up state"):::00002:Current Operational Mode::routine 110 if{ "Current Operational Status":104 } == "down" then RedText({ "Current Operational Status":104 }) Else if{ "Current Operational Status":104 } == "up" then GreenText({ "Current Operational Status":104 }) else YellowText("Other State")