From 5242f67d973c9303d9cc0214690387992eda5f9f Mon Sep 17 00:00:00 2001 From: Andy Paine Date: Mon, 5 Aug 2019 13:47:53 +0100 Subject: [PATCH] REP-340: Use PaaS hosted stats exporter - We are running the statsd exporter on PaaS now and we can route to it on apps.internal - Send metrics there instead so they end up in Prometheus --- app/config.py | 6 +++--- manifest.yml.j2 | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/config.py b/app/config.py index 1b602c57e..a7b473b14 100644 --- a/app/config.py +++ b/app/config.py @@ -21,6 +21,9 @@ class Config(object): TEMPLATE_PREVIEW_API_KEY = os.environ.get('TEMPLATE_PREVIEW_API_KEY', 'my-secret-key') # Hosted graphite statsd prefix + STATSD_ENABLED = False + STATSD_HOST = os.getenv('STATSD_HOST') + STATSD_PORT = 8125 STATSD_PREFIX = os.getenv('STATSD_PREFIX') # Logging @@ -65,9 +68,6 @@ class Config(object): ACTIVITY_STATS_LIMIT_DAYS = 7 TEST_MESSAGE_FILENAME = 'Report' - STATSD_ENABLED = False - STATSD_HOST = "statsd.hostedgraphite.com" - STATSD_PORT = 8125 NOTIFY_ENVIRONMENT = 'development' LOGO_UPLOAD_BUCKET_NAME = 'public-logos-local' MOU_BUCKET_NAME = 'local-mou' diff --git a/manifest.yml.j2 b/manifest.yml.j2 index 17ee33f37..62007fa23 100644 --- a/manifest.yml.j2 +++ b/manifest.yml.j2 @@ -49,6 +49,7 @@ applications: ANTIVIRUS_API_HOST: '{{ ANTIVIRUS_API_HOST }}' ANTIVIRUS_API_KEY: '{{ ANTIVIRUS_API_KEY }}' + STATSD_HOST: 'notify-statsd-exporter-{{ environment }}.apps.internal' STATSD_PREFIX: '{{ STATSD_PREFIX }}' ZENDESK_API_KEY: '{{ ZENDESK_API_KEY }}'