summaryrefslogtreecommitdiffstats
path: root/lib/Smokeping
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2006-08-31 01:12:31 +0200
committerTobi Oetiker <tobi@oetiker.ch>2006-08-31 01:12:31 +0200
commit8edaa7fee41f9d5597a656123a481f2483906053 (patch)
tree81d39707ebc2cc1523744219e1a9f8676052d5a2 /lib/Smokeping
parenta1e648c79fc9300d981b45c0d31b594c819b51c7 (diff)
downloadsmokeping-8edaa7fee41f9d5597a656123a481f2483906053.tar.gz
smokeping-8edaa7fee41f9d5597a656123a481f2483906053.tar.xz
added alert mailtemplates and new probe config ProbeUnit
Diffstat (limited to 'lib/Smokeping')
-rw-r--r--lib/Smokeping/probes/FTPtransfer.pm12
-rw-r--r--lib/Smokeping/probes/base.pm4
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/Smokeping/probes/FTPtransfer.pm b/lib/Smokeping/probes/FTPtransfer.pm
index 707129c..c4c39e8 100644
--- a/lib/Smokeping/probes/FTPtransfer.pm
+++ b/lib/Smokeping/probes/FTPtransfer.pm
@@ -53,7 +53,7 @@ Many variables can be specified either in the probe or in the target definition,
the target-specific variable will override the prove-specific variable.
DOC
authors => <<'DOC',
-Tobias Oetiker <tobi@oetiker.ch>
+Tobias Oetiker <tobi@oetiker.ch> sponsored by Virtela
DOC
bugs => <<DOC,
This probe has the capability for saturating your links, so don't use it
@@ -62,8 +62,12 @@ DOC
}
}
-sub ProbeDesc {
- return "FTP transfer";
+sub ProbeDesc ($) {
+ return "File transfers (FTP)";
+}
+
+sub ProbeUnit ($) {
+ return "Bytes/Second";
}
sub new {
@@ -126,7 +130,7 @@ sub pingone {
$ftp->quit;
$elapsed = ( $end - $start );
$ok or next;
- my $speed = $elapsed / $size;
+ my $speed = $size / $elapsed;
$self->do_debug("$host: ftp $mode $speed Bytes/s");
push @rates, $speed;
}
diff --git a/lib/Smokeping/probes/base.pm b/lib/Smokeping/probes/base.pm
index 4a83b50..e33416f 100644
--- a/lib/Smokeping/probes/base.pm
+++ b/lib/Smokeping/probes/base.pm
@@ -90,6 +90,10 @@ sub ProbeDesc ($) {
return "Probe which does not overrivd the ProbeDesc methode";
}
+sub ProbeUnit ($) {
+ return "Seconds";
+}
+
sub target2dynfile ($$) {
# the targets are stored in the $self->{targets}
# hash as filenames pointing to the RRD files