aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/config.pm.dist (renamed from include/config.pm)2
-rw-r--r--include/nms/snmp.pm1
-rw-r--r--include/nms/util.pm12
-rwxr-xr-xinclude/nms/web.pm3
4 files changed, 11 insertions, 7 deletions
diff --git a/include/config.pm b/include/config.pm.dist
index dcc784d..78f03cc 100755
--- a/include/config.pm
+++ b/include/config.pm.dist
@@ -14,7 +14,7 @@ our $graphite_port = "2003";
# Influx
our $influx_host = "http://localhost:8086";
our $influx_username = "gondulWrite";
-our $influx_password = "funfunfunWrite";
+our $influx_password = "pasr";
our $influx_database = "gondul";
# Max SNMP polls to fire off at the same time.
diff --git a/include/nms/snmp.pm b/include/nms/snmp.pm
index 45ab6c6..6165a5a 100644
--- a/include/nms/snmp.pm
+++ b/include/nms/snmp.pm
@@ -1,6 +1,7 @@
#! /usr/bin/perl
use strict;
use warnings;
+use FixedSNMP;
use SNMP;
use nms;
package nms::snmp;
diff --git a/include/nms/util.pm b/include/nms/util.pm
index 511da33..69f5392 100644
--- a/include/nms/util.pm
+++ b/include/nms/util.pm
@@ -91,10 +91,11 @@ sub guess_placement_dx {
$y = 880;
$xx = $x + 230;
$yy = $y + 40;
- } elsif ($name =~ /^distro(\d)$/) {
+ } elsif ($name =~ /^s(\d).floor$/) {
my $d = ($1);
+ $d -= 1;
$src = "distro";
- $x = 1550 - $d * 700;
+ $x = 1550 - $d * 600;
$y = 410;
$xx = $x + 230;
$yy = $y + 40;
@@ -180,11 +181,12 @@ sub guess_placement_tg {
$y = int(759 + 20.5 * $s);
$xx = $x + 65;
$yy = $y + 14;
- } elsif ($name =~ /^distro(\d)/) {
+ } elsif ($name =~ /^s(\d).floor/) {
my $d = ($1);
$src = "distro";
- $x = 292 + $d * 165;
- $y = 415;
+ $d -= 1;
+ $x = 260 + $d * 145;
+ $y = 417;
$xx = $x + 130;
$yy = $y + 20;
} else {
diff --git a/include/nms/web.pm b/include/nms/web.pm
index 6592bfb..588498f 100755
--- a/include/nms/web.pm
+++ b/include/nms/web.pm
@@ -85,7 +85,8 @@ sub finalize_output {
$json{'time'} = int($query->fetchrow_hashref()->{'time'});
$json{'hash'} = $hash;
if (defined($get_params{'now'})) {
- $cc{'max-age'} = "3600";
+ $cc{'max-age'} = "60";
+ $cc{'stale-while-revalidate'} = "3600";
}
printcc;