forked from sensu/sensu-puppet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP (sensu#637) Add check proxy_requests functionality
Left off setting up an example for proxy request checks using Vagrant. Pick back up here following the proxy requests guide: https://sensuapp.org/docs/0.29/reference/checks.html#proxy-requests-attributes
- Loading branch information
1 parent
22cffaf
commit 3257f76
Showing
5 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,5 +88,4 @@ def set_property(property, value) | |
conf['checks'][resource[:name]][property.to_s] = value | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Proxy Client. See: | ||
# https://sensuapp.org/docs/latest/guides/getting-started/adding-a-client.html#proxy-clients | ||
node default { | ||
$filters = { | ||
'offhours' => { | ||
'attributes' => { | ||
'client' => { | ||
'environment' => 'production', | ||
}, | ||
}, | ||
'when' => { | ||
'days' => { | ||
'all' => [ | ||
{ | ||
'begin' => '2:00 AM', | ||
'end' => '1:00 AM', | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
$filter_defaults = { | ||
'when' => { | ||
'days' => { | ||
'all' => [ | ||
{ | ||
'begin' => '2:00 AM', | ||
'end' => '1:00 AM', | ||
}, | ||
], | ||
}, | ||
}, | ||
} | ||
|
||
# Use the internal 192.168.56.* address | ||
if $facts['networking']['interfaces']['eth1'] != undef { | ||
$ip = $facts['networking']['interfaces']['eth1']['ip'] | ||
} elsif $facts['networking']['interfaces']['enp0s8'] != undef { | ||
$ip = $facts['networking']['interfaces']['enp0s8']['ip'] | ||
} else { | ||
$ip = $facts['networking']['ip'] | ||
} | ||
|
||
class { '::sensu': | ||
rabbitmq_password => 'correct-horse-battery-staple', | ||
rabbitmq_host => '192.168.56.10', | ||
rabbitmq_vhost => '/sensu', | ||
subscriptions => 'all', | ||
client_address => $ip, | ||
filters => $filters, | ||
filter_defaults => $filter_defaults, | ||
} | ||
} |