Add timeout management for Mongo integration
MODIFY
spec/integrations/mongo_spec.rb
spec/integrations/mongo_spec.rb
@@ -5,6 +5,7 @@ describe 'datadog::mongo' do
instances:
- server: mongodb://localhost:27017
+ timeout: 60
tags:
- 'env:test'
@@ -24,6 +25,7 @@ describe 'datadog::mongo' do
{
host: 'localhost',
port: '27017',
+ timeout: '60',
tags: ['env:test']
}
]

MODIFY
templates/default/mongo.yaml.erb
templates/default/mongo.yaml.erb
instances:
<% @instances.each do |i| -%>
- server: mongodb://<%= i['host']%>:<%= i['port'] %>
+ <% if i.key?('timeout') -%>
+ timeout: <%= i['timeout'] %>
+ <% end -%>
<% if i.key?('tags') -%>
tags:
<% i['tags'].each do |t| -%>

Add timeout management for Mongo integration (#728)