diff options
author | Kristian Lyngstol <kly@kly.no> | 2016-06-30 10:04:00 +0200 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2016-06-30 10:04:00 +0200 |
commit | 2e5ae67caa93a2652ea8e24e45126075c569e0cc (patch) | |
tree | 165b7e17b8a60ef7d5e3cb96ada321a65b61bd04 /web/api/public/switch-state | |
parent | 2ed8912b353101bbe1b23fd74446eb9bce1a6751 (diff) |
Uplink logic for DX
Diffstat (limited to 'web/api/public/switch-state')
-rwxr-xr-x | web/api/public/switch-state | 6 |
1 files changed, 3 insertions, 3 deletions
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"; |