aboutsummaryrefslogtreecommitdiffstats
path: root/collectors
diff options
context:
space:
mode:
Diffstat (limited to 'collectors')
-rwxr-xr-xcollectors/ping.pl6
-rwxr-xr-xcollectors/snmpfetchng.pl2
2 files changed, 4 insertions, 4 deletions
diff --git a/collectors/ping.pl b/collectors/ping.pl
index 6cb3bb5..2d181b3 100755
--- a/collectors/ping.pl
+++ b/collectors/ping.pl
@@ -20,7 +20,7 @@ my $q = $dbh->prepare("SELECT switch,sysname,host(mgmt_v4_addr) as ip,host(mgmt_
my $lq = $dbh->prepare("SELECT linknet,addr1,addr2 FROM linknets WHERE addr1 is not null and addr2 is not null;");
my $last = time();
-my $target = 0.7;
+my $target = 1.5;
# Hack to avoid starting the collector before graphite is up.
sleep(5);
my $sock = IO::Socket::IP->new(
@@ -38,7 +38,7 @@ while (1) {
$last = time();
# ping loopbacks
my $ping = Net::Oping->new;
- $ping->timeout(0.4);
+ $ping->timeout(0.9);
$q->execute;
my %ip_to_switch = ();
@@ -78,10 +78,10 @@ while (1) {
my $now_graphite = time();
while (my ($ip, $latency) = each %$result) {
my $switch = $ip_to_switch{$ip};
- my $sysname = $sw_to_sysname{$switch};
if (!defined($switch)) {
next;
}
+ my $sysname = $sw_to_sysname{$switch};
if (!defined($latency)) {
$drops += $dropped{$ip};
diff --git a/collectors/snmpfetchng.pl b/collectors/snmpfetchng.pl
index b961cac..df90138 100755
--- a/collectors/snmpfetchng.pl
+++ b/collectors/snmpfetchng.pl
@@ -61,7 +61,7 @@ sleep(5);
my $sock = IO::Socket::IP->new(
PeerHost => "$nms::config::graphite_host:$nms::config::graphite_port",
Timeout => 20,
- ) or die "Cannot connect - $@";
+ ) or die "Cannot connect to graphite - $@";
$sock->blocking( 0 );