Merge pull request #2468 from alphagov/local-statsd-exporter

Local statsd exporter
This commit is contained in:
Alexey Bezhan
2019-04-24 15:27:55 +01:00
committed by GitHub
6 changed files with 62 additions and 14 deletions

View File

@@ -9,8 +9,8 @@
'notify-delivery-celery-beat': {'memory': '128M'},
'notify-delivery-worker-database': {},
'notify-delivery-worker-research': {},
'notify-delivery-worker-sender': {'disk_quota': '2G', 'memory': '3G'},
'notify-delivery-worker-research': {'local_statsd': ['preview', 'staging']},
'notify-delivery-worker-sender': {'disk_quota': '2G', 'memory': '3G', 'local_statsd': ['preview', 'staging']},
'notify-delivery-worker-periodic': {},
'notify-delivery-worker-priority': {},
'notify-delivery-worker': {},
@@ -37,6 +37,10 @@ applications:
{%- for route in app['routes'][environment] %}
- route: {{ route }}
{%- endfor -%}
{%- elif environment in app.get('local_statsd', []) -%}
health-check-type: none
routes:
- route: {{ CF_APP }}-{{ environment }}.cloudapps.digital
{%- else -%}
health-check-type: none
no-route: true
@@ -45,6 +49,7 @@ applications:
services:
- notify-db
- logit-ssl-syslog-drain
{% if environment in app.get('local_statsd', []) %}- notify-prometheus{% endif %}
env:
NOTIFY_APP_NAME: {{ app.get('NOTIFY_APP_NAME', CF_APP.replace('notify-', '')) }}
@@ -70,7 +75,13 @@ applications:
AWS_ACCESS_KEY_ID: '{{ AWS_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '{{ AWS_SECRET_ACCESS_KEY }}'
{% if environment in app.get('local_statsd', []) %}
STATSD_HOST: "localhost"
STATSD_PREFIX: ""
{% else %}
STATSD_HOST: "statsd.hostedgraphite.com"
STATSD_PREFIX: '{{ STATSD_PREFIX }}'
{% endif %}
ZENDESK_API_KEY: '{{ ZENDESK_API_KEY }}'