Merge pull request #6039 from AlanCoding/log_certs

Setting for external logging cert verification
This commit is contained in:
Alan Rominger 2017-04-17 16:59:33 -04:00 committed by GitHub
commit 31c18f2e16
2 changed files with 8 additions and 2 deletions

View File

@ -39,6 +39,7 @@ PARAM_NAMES = {
'indv_facts': 'LOG_AGGREGATOR_INDIVIDUAL_FACTS',
'enabled_flag': 'LOG_AGGREGATOR_ENABLED',
'http_timeout': 'LOG_AGGREGATOR_HTTP_TIMEOUT',
'verify_cert': 'LOG_AGGREGATOR_VERIFY_CERT'
}
@ -146,8 +147,11 @@ class BaseHTTPSHandler(logging.Handler):
payload_str = json.dumps(payload_input)
else:
payload_str = payload_input
return dict(data=payload_str, background_callback=unused_callback,
timeout=self.http_timeout)
kwargs = dict(data=payload_str, background_callback=unused_callback,
timeout=self.http_timeout)
if self.verify_cert is False:
kwargs['verify'] = False
return kwargs
def skip_log(self, logger_name):
if self.host == '' or (not self.enabled_flag):

View File

@ -866,8 +866,10 @@ INSIGHTS_URL_BASE = "https://access.redhat.com"
TOWER_SETTINGS_MANIFEST = {}
# Settings related to external logger configuration
LOG_AGGREGATOR_ENABLED = False
LOG_AGGREGATOR_HTTP_TIMEOUT = 5
LOG_AGGREGATOR_VERIFY_CERT = True
# The number of retry attempts for websocket session establishment
# If you're encountering issues establishing websockets in clustered Tower,