chef-datadog icon indicating copy to clipboard operation
chef-datadog copied to clipboard

provide resource to roll-out custom AgentChecks

Open rmoriz opened this issue 8 years ago • 3 comments

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

rmoriz avatar May 19 '16 09:05 rmoriz

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!

olivielpeau avatar Jul 13 '16 13:07 olivielpeau

  1. 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
    
  2. custom template source

    datadog_monitor 'systemd_check'
    

    while datadog_monitor provides the option to set a source cookbook, there is no way to overwrite the source attribute of the template resource. This sucks, because I don't want to place the template inside the root template folder of a wrapper cookbook.

rmoriz avatar Jul 14 '16 14:07 rmoriz

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!

olivielpeau avatar Aug 09 '16 09:08 olivielpeau