mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
Add monitoring_statsd in cloud_platform
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
'monitoring_status',
|
||||
'logging_json',
|
||||
# 'monitoring_log_requests',
|
||||
'monitoring_statsd',
|
||||
'server_environment', # OCA/server-tools
|
||||
],
|
||||
'website': 'http://www.camptocamp.com',
|
||||
|
||||
@@ -99,6 +99,11 @@ class CloudPlatform(models.AbstractModel):
|
||||
", we got: '%s'" % (prefix,)
|
||||
)
|
||||
|
||||
@api.model
|
||||
def _check_metrics(self, environment_name):
|
||||
if environment_name == 'prod':
|
||||
assert is_true(os.environ.get('ODOO_STATSD'))
|
||||
|
||||
@api.model
|
||||
def check(self):
|
||||
if is_true(os.environ.get('ODOO_CLOUD_PLATFORM_UNSAFE')):
|
||||
@@ -117,6 +122,7 @@ class CloudPlatform(models.AbstractModel):
|
||||
environment_name = config['running_env']
|
||||
self._check_s3(environment_name)
|
||||
self._check_redis(environment_name)
|
||||
self._check_metrics(environment_name)
|
||||
|
||||
@api.cr
|
||||
def _register_hook(self, cr):
|
||||
|
||||
Reference in New Issue
Block a user