aboutsummaryrefslogtreecommitdiffstats
path: root/web/api/read/snmp
diff options
context:
space:
mode:
authorOle Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com>2025-04-13 07:18:45 +0200
committerGitHub <noreply@github.com>2025-04-13 07:18:45 +0200
commit4ea3a099b05fa910498bfbf1b2d7387118355472 (patch)
treec248cf6764412471ee3e0d1218761bee19fb396a /web/api/read/snmp
parent09710c061d5b8ae86b3dfe49f4b8936c13a10535 (diff)
Upgrade bootstrap and rewrite API (#230)HEADmaster
Diffstat (limited to 'web/api/read/snmp')
-rwxr-xr-xweb/api/read/snmp30
1 files changed, 0 insertions, 30 deletions
diff --git a/web/api/read/snmp b/web/api/read/snmp
deleted file mode 100755
index 0865107..0000000
--- a/web/api/read/snmp
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /usr/bin/perl
-# vim:ts=8:sw=8
-
-use CGI qw(fatalsToBrowser);
-use DBI;
-use lib '/opt/gondul/include';
-use nms;
-use nms::web;
-use strict;
-use warnings;
-use JSON;
-use Data::Dumper;
-
-$nms::web::cc{'max-age'} = "10";
-
-my $q = $nms::web::dbh->prepare('select sysname,data from snmp natural join switches where id in (select max(id) from snmp where '
- . $nms::web::when . 'group by switch);');
-
-$q->execute();
-while (my $ref = $q->fetchrow_hashref()) {
- my $sysname = $ref->{'sysname'};
-
- # This is, strictly speaking, redundant. But by doing this, we can
- # re-use the standard methods of finalize_output() and whatnot.
- my $data = JSON::XS::decode_json($ref->{'data'});
-
- $nms::web::json{'snmp'}{$ref->{'sysname'}} = $data;
-}
-
-finalize_output();