Merge "Add collectd notifications for Pacemaker resources"

This commit is contained in:
Jenkins 2015-08-26 13:09:22 +00:00 committed by Gerrit Code Review
commit 507c3c229d

View File

@ -90,6 +90,38 @@ class lma_collector::collectd::controller (
$modules['pacemaker_resource'] = {
'Resource' => $pacemaker_resources,
}
# Configure the filter that will notify other collectd plugins about the
# state of the Pacemaker resources
collectd::plugin { 'target_notification':
}
collectd::plugin { 'match_regex':
}
class { 'collectd::plugin::chain':
chainname => 'PostCache',
defaulttarget => 'write',
rules => [
{
'match' => {
'type' => 'regex',
'matches' => {
'Plugin' => '^pacemaker_resource$',
},
},
'targets' => [
{
'type' => 'notification',
'attributes' => {
'Message' => '{\"resource\":\"%{type_instance}\",\"value\":%{ds:value}}',
'Severity' => 'OKAY',
},
},
],
},
],
}
}
if $haproxy_socket {