diff options
author | Kristian Lyngstøl <kly@kly.no> | 2017-04-10 14:06:23 +0200 |
---|---|---|
committer | Kristian Lyngstøl <kly@kly.no> | 2017-04-10 14:06:23 +0200 |
commit | bb862773d69bc5997bd1628a3f0505827e7cfe5c (patch) | |
tree | 672b4584c66cf79cf83b02224047aa1b92246636 /collectors | |
parent | 134299c3d95a10ed11b184eac61a704c45d17000 (diff) |
TG17 stuff ?
Diffstat (limited to 'collectors')
-rwxr-xr-x | collectors/ping.pl | 6 | ||||
-rwxr-xr-x | collectors/snmpfetchng.pl | 2 |
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 ); |