Skip to content

Commit 6d63b24

Browse files
authored
Merge pull request #258 from DataDog/scott/http-check-instance-fix
set disable_ssl_validation parameter
2 parents 7d8bd03 + 59c2f03 commit 6d63b24

2 files changed

Lines changed: 29 additions & 2 deletions

File tree

manifests/integrations/http_check.pp

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
# This class will install the necessary config to hook the http_check in the agent
44
#
55
# Parameters:
6+
# sitename
7+
# (Required) The name of the instance.
8+
#
69
# url
10+
# (Required) The url to check.
11+
#
712
# timeout
13+
# The (optional) timeout in seconds.
814
#
915
# username
1016
# password
@@ -57,9 +63,12 @@
5763
# a list of users to notify within the service configuration.
5864
#
5965
# tags
66+
# The (optional) tags to add to the check instance.
6067
#
6168
# Sample Usage:
6269
#
70+
# Add a class for each check instance:
71+
#
6372
# class { 'datadog_agent::integrations::http_check':
6473
# sitename => 'google',
6574
# url => 'http://www.google.com/',
@@ -86,6 +95,22 @@
8695
# }
8796
#
8897
#
98+
# Add multiple instances in one class declaration:
99+
#
100+
# class { 'datadog_agent::integrations::http_check':
101+
# instances => [{
102+
# 'sitename' => 'google',
103+
# 'url' => 'http://www.google.com',
104+
# },
105+
# {
106+
# 'sitename' => 'local',
107+
# 'url' => 'http://localhost/',
108+
# 'headers' => ['Host: stan.borbat.com', 'DNT: true'],
109+
# 'tags' => ['production', 'wordpress']
110+
# }]
111+
# }
112+
113+
89114
class datadog_agent::integrations::http_check (
90115
$sitename = undef,
91116
$url = undef,
@@ -117,7 +142,7 @@
117142
'content_match' => $content_match,
118143
'include_content' => $include_content,
119144
'collect_response_time' => $collect_response_time,
120-
'disable_ssl_validation' => $disable_ssl_validation,
145+
'disable_ssl_validation' => $disable_ssl_validation,
121146
'headers' => $headers,
122147
'tags' => $tags,
123148
'contact' => $contact,

templates/agent-conf.d/http_check.yaml.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ instances:
2828
<% if instance['collect_response_time'] -%>
2929
collect_response_time: <%= instance['collect_response_time'] %>
3030
<% end -%>
31-
disable_ssl_validation: <%= instance['disable_ssl_validation'] %>
31+
<% if instance['disable_ssl_validation'] -%>
32+
disable_ssl_validation: <%= instance['disable_ssl_validation'] %>
33+
<% end -%>
3234
<% if instance['headers'] and ! instance['headers'].empty? -%>
3335
headers:
3436
<%- Array(instance['headers']).each do |header| -%>

0 commit comments

Comments
 (0)