From 2e5ae67caa93a2652ea8e24e45126075c569e0cc Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Thu, 30 Jun 2016 10:04:00 +0200 Subject: Uplink logic for DX --- web/api/public/switch-state | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/api/public/switch-state') diff --git a/web/api/public/switch-state b/web/api/public/switch-state index b7cd70c..557c312 100755 --- a/web/api/public/switch-state +++ b/web/api/public/switch-state @@ -27,7 +27,7 @@ while ( my $ref = $q->fetchrow_hashref() ) { } else { $json{'switches'}{$sysname}{ifs}{$smallport}{'ifAlias'} = $port{'ifAlias'}; } - if ($porti =~ /ge-0\/0\/4[4-7]$/) { + if ($porti =~ /Gi1\/0\/4[78]$/) { $json{'switches'}{$sysname}{'uplinks'}{'ifHCInOctets'} += $port{'ifHCInOctets'}; $json{'switches'}{$sysname}{'uplinks'}{'ifHCOutOctets'} += $port{'ifHCOutOctets'}; if ($port{'ifOperStatus'} eq "up") { @@ -70,7 +70,7 @@ while ( my $ref = $q2->fetchrow_hashref() ) { } else { $json{'then'}{$sysname}{ifs}{$smallport}{'ifAlias'} = $port{'ifAlias'}; } - if ($porti =~ /ge-0\/0\/4[4-7]$/) { + if ($porti =~ /Gi1\/0\/4[78]$/) { $json{'then'}{$sysname}{'uplinks'}{'ifHCInOctets'} += $port{'ifHCInOctets'}; $json{'then'}{$sysname}{'uplinks'}{'ifHCOutOctets'} += $port{'ifHCOutOctets'}; if ($port{'ifOperStatus'} eq "up") { @@ -89,7 +89,7 @@ while ( my $ref = $q2->fetchrow_hashref() ) { } $json{'then'}{$sysname}{totals}{'total'} += 1; } - $json{'then'}{$sysname}{'temp'} = $data{'misc'}{'enterprises.2636.3.1.13.1.7.7.1.0.0'}{''}; + $json{'then'}{$sysname}{'temp'} = $data{'misc'}{'jnxOperatingTemp'}{'7.1.0.0'} || $data{'misc'}{'ciscoEnvMonTemperatureStatusValue'}{'1011'}; $json{'then'}{$sysname}{'time'} = $ref->{'time'}; } $nms::web::cc{'max-age'} = "5"; -- cgit v1.2.3