Added support for multiple collabs to clarified::probe

This commit is contained in:
Ossi Salmi 2011-02-25 01:05:33 +02:00 committed by Timo Mkinen
parent 3af6b4f0f7
commit 61b1501079
2 changed files with 15 additions and 3 deletions

View file

@ -140,12 +140,21 @@ class clarified::recorder inherits clarified {
# $remoteport: # $remoteport:
# Remote port. Defaults to 10000. # Remote port. Defaults to 10000.
# $collab: # $collab:
# Use collab for authentication, format is "<collab name>:<page name>". # List of collabs for authentication.
# $probe: # $probe:
# Enable probe. Defaults to true. # Enable probe. Defaults to true.
# $remote: # $remote:
# Enable remote. Defaults to true. # Enable remote. Defaults to true.
# #
# === Sample usage
#
# clarified::probe { "eth0":
# keeptime => "500GB",
# blocksize => "10GB",
# filter => "host 192.168.1.1",
# collab => [ "collabname:PageName", ],
# }
#
define clarified::probe($interface="", $snaplen="65535", $keeptime="100GB", define clarified::probe($interface="", $snaplen="65535", $keeptime="100GB",
$blocksize="1GB", $filter="", $remoteport="10000", $blocksize="1GB", $filter="", $remoteport="10000",
$collab="", $probe=true, $remote=true) { $collab="", $probe=true, $remote=true) {

View file

@ -27,8 +27,11 @@ PORT=<%= remoteport %>
. /etc/clarified/clarified-functions . /etc/clarified/clarified-functions
start() { start() {
start_remote \
start_remote -p $PORT -c '<%= collab %>' "$WORK_DIR" "$PRIVATE_CERT" "$PUBLIC_CERT" <% collab.each do |c| -%>
-c '<%= c %>' \
<% end -%>
-p $PORT "$WORK_DIR" "$PRIVATE_CERT" "$PUBLIC_CERT"
#LOG_SUCCESS "Remote" $REMOTE_IDENT "up" #LOG_SUCCESS "Remote" $REMOTE_IDENT "up"
} }