Added Tcp_check agent#286
Conversation
| # trigger if the check fails <threshold> times in <window> attempts. | ||
| # | ||
| # window | ||
| # (Optional) - Refer to �threshold�. |
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
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.
|
|
||
|
|
||
| class datadog_agent::integrations::tcp_check ( | ||
| $name = undef, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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'] %> |
There was a problem hiding this comment.
You will have to update this to instance['sitename'] or whatever.
|
This now tests out, and works. Looks good and should be ready for merging. Thanks for the help on the pull request earlier. |
|
Thanks @aepod! This looks much better now, merging. 🙇 |
* 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
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.