Updated clarified module for new recorder init scripts
This commit is contained in:
parent
f1fc87b750
commit
6f828786eb
3 changed files with 30 additions and 135 deletions
|
@ -56,7 +56,7 @@ class clarified::recorder {
|
|||
mode => 0644,
|
||||
owner => root,
|
||||
group => root,
|
||||
before => Exec["/usr/local/src/probe-linux-i686.sh"],
|
||||
before => Exec["/usr/local/src/clarified-recorder-linux-i686.sh"],
|
||||
}
|
||||
|
||||
File["/etc/clarified/probe.d", "/etc/clarified/remote.d"] {
|
||||
|
@ -66,17 +66,17 @@ class clarified::recorder {
|
|||
source => "puppet:///modules/custom/empty",
|
||||
}
|
||||
|
||||
file { "/usr/local/src/probe-linux-i686.sh":
|
||||
file { "/usr/local/src/clarified-recorder-linux-i686.sh":
|
||||
ensure => present,
|
||||
mode => 0755,
|
||||
owner => root,
|
||||
group => root,
|
||||
source => "puppet:///files/packages/probe-linux-i686.sh",
|
||||
source => "puppet:///files/packages/clarified-recorder-linux-i686.sh",
|
||||
links => follow,
|
||||
before => Exec["/usr/local/src/probe-linux-i686.sh"],
|
||||
before => Exec["/usr/local/src/clarified-recorder-linux-i686.sh"],
|
||||
}
|
||||
|
||||
exec { "/usr/local/src/probe-linux-i686.sh":
|
||||
exec { "/usr/local/src/clarified-recorder-linux-i686.sh":
|
||||
creates => "/usr/local/probe",
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ class clarified::recorder {
|
|||
cwd => "/usr/local/probe",
|
||||
command => "sed s:@PREFIX@:/usr/local/probe: clarified-functions.in > /etc/clarified/clarified-functions",
|
||||
creates => "/etc/clarified/clarified-functions",
|
||||
require => Exec["/usr/local/src/probe-linux-i686.sh"],
|
||||
require => Exec["/usr/local/src/clarified-recorder-linux-i686.sh"],
|
||||
before => Service["clarified-probe"],
|
||||
}
|
||||
|
||||
|
@ -95,14 +95,15 @@ class clarified::recorder {
|
|||
owner => root,
|
||||
group => root,
|
||||
source => "/usr/local/probe/probe-init.sh",
|
||||
require => Exec["/usr/local/src/probe-linux-i686.sh"],
|
||||
require => Exec["/usr/local/src/clarified-recorder-linux-i686.sh"],
|
||||
before => Service["clarified-probe"],
|
||||
}
|
||||
|
||||
service { "clarified-probe":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
status => "pgrep -f /usr/local/probe",
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasrestart => true,
|
||||
status => "pgrep -f /usr/local/probe",
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -139,12 +140,13 @@ class clarified::recorder {
|
|||
# keeptime => "500GB",
|
||||
# blocksize => "10GB",
|
||||
# filter => "host 192.168.1.1",
|
||||
# collab => [ "collabname:PageName", ],
|
||||
# collab => [ "collabname:PageName" ],
|
||||
# }
|
||||
#
|
||||
define clarified::probe($interface="", $snaplen="65535", $keeptime="100GB",
|
||||
$blocksize="1GB", $filter="", $remoteport="10000",
|
||||
$collab="", $probe=true, $remote=true) {
|
||||
$collab=[], $probeopt="", $remoteopt="",
|
||||
$probe=true, $remote=true) {
|
||||
|
||||
if $interface {
|
||||
$interface_real = $interface
|
||||
|
@ -152,12 +154,6 @@ define clarified::probe($interface="", $snaplen="65535", $keeptime="100GB",
|
|||
$interface_real = $name
|
||||
}
|
||||
|
||||
if $filter {
|
||||
$miscopts = "-b ${blocksize} -f \"${filter}\""
|
||||
} else {
|
||||
$miscopts = "-b ${blocksize}"
|
||||
}
|
||||
|
||||
file { "/etc/clarified/probe.d/${name}":
|
||||
ensure => $probe ? {
|
||||
true => present,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue