diff options
author | Tobias Oetiker <tobi@oetiker.ch> | 2013-02-27 16:10:48 +0100 |
---|---|---|
committer | Tobias Oetiker <tobi@oetiker.ch> | 2013-02-27 16:10:48 +0100 |
commit | fd1067f6ac2733818f00909c161b6e084e97ebf9 (patch) | |
tree | 0446672ab4ca4508fd9b78a4b613cdeaf6325eb5 /lib | |
parent | efcd36cf069f51f52fdd9c6b4f433fc979d93e23 (diff) | |
download | smokeping-fd1067f6ac2733818f00909c161b6e084e97ebf9.tar.gz smokeping-fd1067f6ac2733818f00909c161b6e084e97ebf9.tar.xz |
provide more configurable replacements for remocular integration
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Smokeping.pm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index f9d162c..02ece8e 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -726,6 +726,8 @@ sub target_menu($$$$;$){ if ($menuextra){ $menuextra =~ s/{HOST}/#$host/g; $menuextra =~ s/{CLASS}/$menuclass/g; + $menuextra =~ s/{HASH}/#/g; + $menuextra =~ s/{HOSTNAME}/$host/g; $menuextra = ' '.$menuextra; } else { $menuextra = ''; @@ -2304,10 +2306,14 @@ DOC The slave names must match the slaves you have setup in the slaves section. DOC menuextra => { - _doc => <<DOC }, -HTML String to be added to the end of each menu entry. The C<{HOST}> entry will be replaced by the -host property of the relevant section. The C<{CLASS}> entry will be replaced by the same -class as the other tags in the manu line. + _doc => <<'DOC' }, +HTML String to be added to the end of each menu entry. The following tags will be replaced: + + {HOST} -> #$hostname + {HOSTNAME} -> $hostname + {CLASS} -> same class as the other tags in the menu line + {HASH} -> # + DOC probe => { _sub => sub { |