chef-datadog
chef-datadog copied to clipboard
provide resource to roll-out custom AgentChecks
As a DataDog user I've written a custom AgentCheck and want to use chef-datadog to deploy the check and its config to my nodes
=> document example with monitor
resource
=> allow custom template source defintion
Hi @rmoriz,
As you wrote, this could mainly addressed through some improved documentation.
Just to be sure I understand, could you give an example of what you mean by "custom template source definition"? Thanks!
-
The current
monitor
resource only manages .yml files in/etc/dd-agent/conf.d/
Let's say you have authored a custom check, you'll have to poke into the "internals" and manually place the check.
template '/etc/dd-agent/checks.d/systemd_check.py' do source 'systemd_check.py.erb' end
-
custom template source
datadog_monitor 'systemd_check'
while
datadog_monitor
provides the option to set a source cookbook, there is no way to overwrite thesource
attribute of the template resource. This sucks, because I don't want to place the template inside the roottemplate
folder of a wrapper cookbook.
Thanks @rmoriz for detailing your use case!
1.
could be addressed through some improved documentation. If the use case is common enough we could also consider adding a dd-custom-check
recipe that takes care of installing the custom check file and calls the monitor
resource.
For 2.
I agree that it could make sense to allow setting a custom source template on the resource.
Adding both to our triage so that we take care of it at some point, but feel free to open PRs if you have the opportunity!