clarified: Recorder dependency fixes
This commit is contained in:
parent
83ee5a04ac
commit
bf1e65ef93
1 changed files with 32 additions and 19 deletions
|
@ -91,18 +91,16 @@ class clarified::recorder {
|
||||||
owner => "root",
|
owner => "root",
|
||||||
group => "root",
|
group => "root",
|
||||||
source => "puppet:///files/packages/${clarified_recorder_package}",
|
source => "puppet:///files/packages/${clarified_recorder_package}",
|
||||||
before => Exec["/usr/local/src/clarified-recorder-linux.sh"],
|
notify => Exec["rm -f /usr/local/probe"],
|
||||||
}
|
}
|
||||||
exec { "rm -f /usr/local/probe":
|
exec { "rm -f /usr/local/probe":
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
onlyif => "test -h /usr/local/probe",
|
onlyif => "test -h /usr/local/probe",
|
||||||
subscribe => File["/usr/local/src/clarified-recorder-linux.sh"],
|
|
||||||
before => Exec["/usr/local/src/clarified-recorder-linux.sh"],
|
before => Exec["/usr/local/src/clarified-recorder-linux.sh"],
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
}
|
}
|
||||||
exec { "/usr/local/src/clarified-recorder-linux.sh":
|
exec { "/usr/local/src/clarified-recorder-linux.sh":
|
||||||
creates => "/usr/local/probe",
|
creates => "/usr/local/probe",
|
||||||
notify => Service["clarified-probe"],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "clarified-functions":
|
exec { "clarified-functions":
|
||||||
|
@ -133,6 +131,7 @@ class clarified::recorder {
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
before => Service["clarified-probe"],
|
before => Service["clarified-probe"],
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "clarified-probe":
|
service { "clarified-probe":
|
||||||
enable => true,
|
enable => true,
|
||||||
}
|
}
|
||||||
|
@ -174,10 +173,21 @@ class clarified::recorder {
|
||||||
# collab => [ "collabname:PageName" ],
|
# collab => [ "collabname:PageName" ],
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
define clarified::probe($interface="", $snaplen="65535", $keeptime="100GB",
|
define clarified::probe(
|
||||||
$blocksize="1GB", $filter="", $remoteport="10000",
|
$interface=undef,
|
||||||
$collab=[], $probeopt="", $remoteopt="",
|
$snaplen="65535",
|
||||||
$probe=true, $remote=true) {
|
$keeptime="100GB",
|
||||||
|
$blocksize="1GB",
|
||||||
|
$filter="",
|
||||||
|
$remoteport="10000",
|
||||||
|
$collab=[],
|
||||||
|
$probeopt="",
|
||||||
|
$remoteopt="",
|
||||||
|
$probe=true,
|
||||||
|
$remote=true
|
||||||
|
) {
|
||||||
|
|
||||||
|
Class["clarified::recorder"] -> Clarified::Probe[$name]
|
||||||
|
|
||||||
if $interface {
|
if $interface {
|
||||||
$interface_real = $interface
|
$interface_real = $interface
|
||||||
|
@ -209,15 +219,16 @@ define clarified::probe($interface="", $snaplen="65535", $keeptime="100GB",
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "probe-${name}":
|
service { "probe-${name}":
|
||||||
ensure => $probe ? {
|
ensure => $probe ? {
|
||||||
true => running,
|
true => running,
|
||||||
false => stopped,
|
false => stopped,
|
||||||
},
|
},
|
||||||
provider => "base",
|
provider => "base",
|
||||||
start => "/etc/clarified/probe.d/${name} start",
|
start => "/etc/clarified/probe.d/${name} start",
|
||||||
restart => "/etc/clarified/probe.d/${name} restart",
|
restart => "/etc/clarified/probe.d/${name} restart",
|
||||||
stop => "pkill -f /var/run/probe/${name}.pid",
|
stop => "pkill -f /var/run/probe/${name}.pid",
|
||||||
status => "pgrep -f /var/run/probe/${name}.pid",
|
status => "pgrep -f /var/run/probe/${name}.pid",
|
||||||
|
subscribe => Exec["/usr/local/src/clarified-recorder-linux.sh"],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/clarified/remote.d/${name}":
|
file { "/etc/clarified/remote.d/${name}":
|
||||||
|
@ -237,15 +248,17 @@ define clarified::probe($interface="", $snaplen="65535", $keeptime="100GB",
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "remote-${name}":
|
service { "remote-${name}":
|
||||||
ensure => $remote ? {
|
ensure => $remote ? {
|
||||||
true => running,
|
true => running,
|
||||||
false => stopped,
|
false => stopped,
|
||||||
},
|
},
|
||||||
provider => "base",
|
provider => "base",
|
||||||
start => "/etc/clarified/remote.d/${name} start",
|
start => "/etc/clarified/remote.d/${name} start",
|
||||||
restart => "/etc/clarified/remote.d/${name} restart",
|
restart => "/etc/clarified/remote.d/${name} restart",
|
||||||
stop => "pkill -f /var/run/remote/${name}.pid",
|
stop => "pkill -f /var/run/remote/${name}.pid",
|
||||||
status => "pgrep -f /var/run/remote/${name}.pid",
|
status => "pgrep -f /var/run/remote/${name}.pid",
|
||||||
|
require => Service["probe-${name}"],
|
||||||
|
subscribe => Exec["/usr/local/src/clarified-recorder-linux.sh"],
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue