Skip to content
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

"name" attribute is not parsed in by the http_check.pp script #172

Closed
bshih-ixxus opened this issue Mar 24, 2016 · 4 comments
Closed

"name" attribute is not parsed in by the http_check.pp script #172

bshih-ixxus opened this issue Mar 24, 2016 · 4 comments

Comments

@bshih-ixxus
Copy link

In "http_check.yaml.example", it states that we can specify a "name" attribute.

# - name: My second service 
#   url: https://another.url.example.com 

However, the "name" attribute is not being parsed in "http_check.pp" script.

[class datadog_agent::integrations::http_check ( 
  $url       = undef, 
  $username  = undef, ](url)

Potentially, this can be fixed by modifying the script and the .erb files as below:

  1. https://github.com/DataDog/puppet-datadog-agent/blob/master/manifests/integrations/http_check.pp
  class datadog_agent::integrations::http_check ( 
+   $svcname   = undef, 
    $url       = undef, 
  1. https://github.com/DataDog/puppet-datadog-agent/blob/master/templates/agent-conf.d/http_check.yaml.erb

  instances: 
!     -   name: <%= @name %> 
          url: <%= @url %> 
  <% if @timeout -%> 
          timeout: <%= @timeout %> 
--- 1,7 ---- 
  init_config: 

  instances: 
!     -   name: <%= @svcname %> 
          url: <%= @url %> 
  <% if @timeout -%> 
          timeout: <%= @timeout %> 
@truthbk
Copy link
Member

truthbk commented Jun 2, 2016

@bshih-ixxus this is indeed an issue, would you like to submit a PR? Or you'd rather I do it? I'm fine with either, just let me know. If I don't hear from you in a short while, I'll assume you either haven't seen this, or don't really care so I'd submit a patch myself ;)

Thanks for raising this!

@truthbk
Copy link
Member

truthbk commented Jun 2, 2016

Couldn't resist, created the PR here #186 😄

@bshih-ixxus
Copy link
Author

@truthbk Of course I care about it 😄 and thanks for raising the PR.

@truthbk
Copy link
Member

truthbk commented Jun 22, 2016

@bshih-ixxus this was merged into the the 1.7.1 bugfix release of the module we made yesterday. Thanks again!

@truthbk truthbk closed this as completed Jun 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants