diff options
Diffstat (limited to 'web/nms.gathering.org/ping-json2.pl')
-rwxr-xr-x | web/nms.gathering.org/ping-json2.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/nms.gathering.org/ping-json2.pl b/web/nms.gathering.org/ping-json2.pl index a24c589..e2b29ae 100755 --- a/web/nms.gathering.org/ping-json2.pl +++ b/web/nms.gathering.org/ping-json2.pl @@ -16,7 +16,7 @@ my $when =" updated > " . $now . " - '15 secs'::interval and updated < " . $now my %json = (); -my $q = $dbh->prepare("SELECT DISTINCT ON (switch,sysname) switch,sysname, latency_ms FROM ping NATURAL JOIN switches WHERE $when ORDER BY switch,sysname, updated DESC;"); +my $q = $dbh->prepare("SELECT DISTINCT updated,switch,sysname, latency_ms FROM ping NATURAL JOIN switches WHERE $when ORDER BY updated DESC;"); $q->execute(); while (my $ref = $q->fetchrow_hashref()) { $json{'switches'}{$ref->{'sysname'}}{'latency'} = $ref->{'latency_ms'}; |