-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Preso and SystemD integration #702
Comments
+1 for systemd |
I know it's not ideal, but note that you can use See: https://github.com/DataDog/chef-datadog#datadog_monitor |
Using
Using the resource like this: datadog_monitor 'systemd' do
instances [{
'unit_names' => [
'sshd',
],
}]
end So you would have to create your own template for it to work I guess. |
Hi @stianfro If you pass the following to use_integration_template true Then it will use a default template that essentially puts whatever you specify as Let me know if it works for you :) |
@albertvaka just what I was looking for, it works great! :) Here's what I ended up with for anyone interested: ruby_block 'list systemd services' do
block do
Chef::Resource::RubyBlock.include Chef::Mixin::ShellOut
command = 'systemctl list-units --type service --no-pager --no-legend | awk -F" " \'{ print $1}\''
node.run_state['unit_names'] = shell_out(command).stdout.split(/\n+/)
end
not_if platform_family?('windows')
end
datadog_monitor 'systemd' do
instances [ node.run_state ]
use_integration_template true
not_if platform_family?('windows')
notifies :restart, 'service[datadog-agent]' if node['datadog']['agent_start']
end |
Please add cookbook recipe/template support for both Presto and SystemD integrations.
The text was updated successfully, but these errors were encountered: