Module for managing Mozilla's Hindsight configuration and service.
Hindsight is a log forwarding engine (successor of Mozilla's Heka) implemented in low-level C with Lua scripting support.
All module names are expected to be available via package manager.
class{'::hindsight':
modules => [ 'luasandbox','luasandbox-elasticsearch',
'luasandbox-kafka','luasandbox-lpeg','luasandbox-systemd']
}
plugin configuration:
hindsight::plugin {'tcp':
filename => 'tcp.lua',
target => 'input/tcp',
config => {
instruction_limit => 0,
address => "0.0.0.0",
port => 5858,
keep_payload => false,
send_decode_failures => true,
}
}
target
is file location in run_dir
without extension (.cfg
).
The simplest plugin is probably debug
:
hindsight::plugin {'debug':
filename => 'heka_debug.lua',
target => 'output/debug',
config => {
message_matcher => 'TRUE',
}
}
in order to disable plugin use ensure => absent
:
hindsight::plugin {'debug':
ensure => absent,
filename => 'heka_debug.lua',
target => 'output/debug',
}
New since version 0.3.0
hindsight::plugin {'debug':
filename => '',
target => output/debug',
content => template('path/to/template.erb');
}
# or
hindsight::plugin {'debug':
filename => '',
target => output/debug',
source => 'puppet:///fubarmodule/debug.cfg';
}
Before starting Hindsight service custom commands can be provided:
class{'::hindsight':
service_prestart => [ '/bin/echo foo', '/bin/echo bar']
}