bundles: fix some icinga checks
This commit is contained in:
parent
11071914e0
commit
5419bf31fb
6 changed files with 17 additions and 6 deletions
|
@ -96,11 +96,16 @@ def monitoring(metadata):
|
|||
for vname, vconfig in metadata.get('nginx/vhosts', {}).items():
|
||||
domain = vconfig.get('domain', vname)
|
||||
|
||||
if metadata.get('nginx/use_ssl_for_all_connections'):
|
||||
scheme = 'https'
|
||||
else:
|
||||
scheme = 'http'
|
||||
|
||||
if 'website_check_path' in vconfig and 'website_check_string' in vconfig:
|
||||
services['NGINX VHOST {} CONTENT'.format(vname)] = {
|
||||
'check_command': 'check_http_wget',
|
||||
'vars.http_wget_contains': vconfig['website_check_string'],
|
||||
'vars.http_wget_url': '{}{}'.format(domain, vconfig['website_check_path']),
|
||||
'vars.http_wget_url': '{}://{}{}'.format(scheme, domain, vconfig['website_check_path']),
|
||||
}
|
||||
|
||||
if vconfig.get('check_ssl', False):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue