aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly@.no>2016-03-23 17:35:48 +0100
committerKristian Lyngstol <kly@kly@.no>2016-03-23 17:35:48 +0100
commita174cec51faa448973056847e5c664801222c739 (patch)
tree8be4ef5c8c5d35b31e64315147f2e46d4671360b
parentb978a05ac787660adc37a98e3173373f372dd8be (diff)
NMS: API: Expose temperature too in public
-rwxr-xr-xweb/nms.gathering.org/api/public/switch-state3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/nms.gathering.org/api/public/switch-state b/web/nms.gathering.org/api/public/switch-state
index 32cf9a6..2a2b5b6 100755
--- a/web/nms.gathering.org/api/public/switch-state
+++ b/web/nms.gathering.org/api/public/switch-state
@@ -32,7 +32,6 @@ while ( my $ref = $q->fetchrow_hashref() ) {
}
$json{'switches'}{$sysname}{'uplinks'}{'total'} += 1;
}
-
$json{'switches'}{$sysname}{ifs}{$smallport}{'ifHCInOctets'} += $port{'ifHCInOctets'};
$json{'switches'}{$sysname}{ifs}{$smallport}{'ifHCOutOctets'} += $port{'ifHCOutOctets'};
$json{'switches'}{$sysname}{totals}{'ifHCInOctets'} += $port{'ifHCInOctets'};
@@ -43,6 +42,7 @@ while ( my $ref = $q->fetchrow_hashref() ) {
}
$json{'switches'}{$sysname}{totals}{'total'} += 1;
}
+ $json{'switches'}{$sysname}{'temp'} = $data{'misc'}{'enterprises.2636.3.1.13.1.7.7.1.0.0'}{''};
$json{'switches'}{$sysname}{'time'} = $ref->{'time'};
}
@@ -83,6 +83,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}{'time'} = $ref->{'time'};
}
$nms::web::cc{'max-age'} = "5";