summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2007-08-21 21:41:56 +0200
committerTobi Oetiker <tobi@oetiker.ch>2007-08-21 21:41:56 +0200
commited8e591272fa1c7ca012db03b45568ec81ff9cfd (patch)
treeeed557d74fa025c118ff0ad3200dd54158fae245
parentd011593577316a9782b6dca8cc4d09dc0b98aba3 (diff)
downloadsmokeping-ed8e591272fa1c7ca012db03b45568ec81ff9cfd.tar.gz
smokeping-ed8e591272fa1c7ca012db03b45568ec81ff9cfd.tar.xz
* add notes about new target-path hosts for multi source graphs
* fix slave zoom graph (we were showing the non slave graph with the slave title) * better error messages form rrd update
-rw-r--r--lib/Smokeping.pm38
1 files changed, 30 insertions, 8 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 8188fd5..4a126b9 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -824,7 +824,8 @@ sub get_detail ($$$$;$){
return "" unless $tree->{host};
my @dirs = @{$open};
- my $file = (split(/~/, pop @dirs))[0];
+
+ my $file = $mode eq 'c' ? (split(/~/, pop @dirs))[0] : pop @dirs;
my $dir = "";
return "<div>ERROR: ".(join ".", @dirs)." has no probe defined</div>"
@@ -1652,7 +1653,7 @@ sub update_rrds($$$$$$) {
do_debuglog("Calling RRDs::update(@rrdupdate)");
RRDs::update ( @rrdupdate );
my $ERROR = RRDs::error();
- do_log "RRDs::update ERROR: $ERROR\n" if $ERROR;
+ do_log "RRDs::update ERROR: $ERROR (".join(' ',@rrdupdate)."\n" if $ERROR;
# check alerts
my ($loss,$rtt) = (split /:/, $update->[2])[1,2];
my $gotalert = check_alerts $cfg,$tree,$pings,$name,$prop,$loss,$rtt,$update->[0];
@@ -1782,18 +1783,38 @@ DOC
host =>
{
_doc => <<DOC,
-Can either contain the name of a target host or the string B<DYNAMIC>.
+There are three types of "hosts" in smokeping.
+
+=over
+
+=item 1.
+
+The 'hostname' is a name of a host you want to target from smokeping
+
+=item 2.
-In the second case, the target machine has a dynamic IP address and
-thus is required to regularly contact the SmokePing server to verify
-its IP address. When starting SmokePing with the commandline argument
+The string B<DYNAMIC>. Is for machines that have a dynamic IP address. These boxes
+are required to regularly contact the SmokePing server to confirm their IP address.
+ When starting SmokePing with the commandline argument
B<--email> it will add a secret password to each of the B<DYNAMIC>
host lines and send a script to the owner of each host. This script
-must be started regularly on the host in question to make sure
-SmokePing monitors the right box. If the target machine supports
+must be started periodically (cron) on the host in question to let smokeping know
+where the host is curently located. If the target machine supports
SNMP SmokePing will also query the hosts
sysContact, sysName and sysLocation properties to make sure it is
still the same host.
+
+=item 3.
+
+A space separated list of 'target-path' entries. All targets mentioned in
+this list will be displayed in one graph. Note that the graph will look
+different from the normal smokeping graphs the normal graph is designed to
+show only one host with all its information. The syntax is as follows:
+
+ /target/target/target[~slave] [/target/...] ...
+
+=back
+
DOC
_sub => sub {
@@ -1801,6 +1822,7 @@ DOC
m|^DYNAMIC| && return undef;
/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ && return undef;
/^[0-9a-f]{0,4}(\:[0-9a-f]{0,4}){0,6}\:[0-9a-f]{0,4}$/i && return undef;
+ m|(?:/$KEYD_RE)+(?:~$KEYD_RE)?(?: (?:/$KEYD_RE)+(?:~$KEYD_RE))*| && return undef;
my $addressfound = 0;
my @tried;
if ($havegetaddrinfo) {