aboutsummaryrefslogtreecommitdiffstats
path: root/include/nms/web.pm
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-03-16 18:15:52 +0000
committerKristian Lyngstol <kly@kly.no>2016-03-16 18:15:52 +0000
commit4666a02a51fa313e34875c169502a0cecf834b1c (patch)
tree1304ed9ed0c978465b2ffaae2ba19b455d32761c /include/nms/web.pm
parent783096cef942a275f23f7c7cb63bbca175cff0ba (diff)
NMS: Rewrite the SNMP fetcher and whatnot
Again. It's using the prototype, and the objects are configurable. I assume this will need some work. Also: I touched ping up to make it work without linknets.
Diffstat (limited to 'include/nms/web.pm')
-rwxr-xr-xinclude/nms/web.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/nms/web.pm b/include/nms/web.pm
index 0f37a59..2a336c6 100755
--- a/include/nms/web.pm
+++ b/include/nms/web.pm
@@ -59,13 +59,14 @@ sub setwhen {
$now = db_safe_quote('now') . "::timestamp ";
$cc{'max-age'} = "3600";
}
- $when = " time > " . $now . " - '5m'::interval and time < " . $now . " ";
+ $when = " time > " . $now . " - '15m'::interval and time < " . $now . " ";
return $when;
}
sub finalize_output {
my $query;
my $hash = Digest::SHA::sha512_base64(FreezeThaw::freeze(%json));
+ $dbh->commit;
$query = $dbh->prepare('select to_char(' . $now . ', \'YYYY-MM-DD"T"HH24:MI:SS\') as time;');
$query->execute();