Skip to content

Added Tcp_check agent#286

Merged
truthbk merged 6 commits intoDataDog:masterfrom
aepod:tcp_check
Mar 3, 2017
Merged

Added Tcp_check agent#286
truthbk merged 6 commits intoDataDog:masterfrom
aepod:tcp_check

Conversation

@aepod
Copy link
Copy Markdown
Contributor

@aepod aepod commented Dec 20, 2016

See: http://docs.datadoghq.com/integrations/tcpcheck/

This should allow for the tcp_check to be used and it has all the required spec files etc.

Comment thread manifests/integrations/tcp_check.pp Outdated
# trigger if the check fails <threshold> times in <window> attempts.
#
# window
# (Optional) - Refer to �threshold�.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aepod the quotes here are not ASCII quotes, this is what's preventing the CI from running your tests. You should probably change them to regular quotes, or just remove them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting copy/paste/edit from the documentation on the check, oops. those quotes snuck through. I assume this was the "non-utf8" error, which was bugging me! haha I will sort this out, thanks for the heads up.

Comment thread manifests/integrations/tcp_check.pp Outdated


class datadog_agent::integrations::tcp_check (
$name = undef,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will probably have to change this parameter name to something else or you'll get this error: The parameter $name redefines a built in parameter in the Host Class Definition. May I suggest sitename or hostname?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, I sort of knew that when I switched it, but wasn't sure. I will switch it to something else and resubmit.

class datadog_agent::integrations::tcp_check (
$name = undef,
$host = undef,
$port = undef,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A required parameter should not have an optional value. I believe host and port are definitely mandatory. I would probably make sitename mandatory as well just to be safe.


instances:
<%- (Array(@_instances)).each do |instance| -%>
- name: <%= instance['name'] %>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will have to update this to instance['sitename'] or whatever.

@aepod
Copy link
Copy Markdown
Contributor Author

aepod commented Dec 22, 2016

This now tests out, and works. Looks good and should be ready for merging. Thanks for the help on the pull request earlier.

@truthbk
Copy link
Copy Markdown
Member

truthbk commented Mar 3, 2017

Thanks @aepod! This looks much better now, merging. 🙇

@truthbk truthbk merged commit 8661f48 into DataDog:master Mar 3, 2017
@truthbk truthbk added this to the 1.10.0 milestone Mar 3, 2017
cegeka-jenkins pushed a commit to cegeka/puppet-datadog_agent that referenced this pull request Jan 31, 2018
* Added tcp_check - This allows for the use of http://docs.datadoghq.com/integrations/tcpcheck/

* Fixed typo in pp file

* Fixed issue with bad quotes in comment and variable name issue

* Fixed issue with spec test

* more spec file fixes

* spec test updated to handle tags better
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants