Skip to content

Instantly share code, notes, and snippets.

@arkan
Created July 1, 2016 14:57
Show Gist options
  • Save arkan/7937526c9349655a1f2a326293a8628d to your computer and use it in GitHub Desktop.
Save arkan/7937526c9349655a1f2a326293a8628d to your computer and use it in GitHub Desktop.
Marathon-lb with datadog integration
FROM datadog/docker-dd-agent:latest
RUN rm /etc/dd-agent/conf.d/haproxy.yaml.example
ADD conf.d/haproxy.yaml /etc/dd-agent/conf.d/haproxy.yaml
RUN sed -i -e"s/^.*histogram_percentiles:.*$/histogram_percentiles: 0.50, 0.75, 0.95, 0.99/" /etc/dd-agent/datadog.conf
RUN sed -i -e"s/^.*histogram_aggregates:.*$/histogram_aggregates: max, median, avg, count/" /etc/dd-agent/datadog.conf
init_config:
instances:
- url: http://172.17.42.1:9090/haproxy?stats
# username: username
# password: password
#
# The (optional) status_check paramater will instruct the check to
# send events on status changes in the backend. This is DEPRECATED in
# favor creation a monitor on the service check status and will be
# removed in a future version.
# status_check: False
#
# The (optional) collect_aggregates_only parameter will instruct the
# check to collect metrics only from the aggregate frontend/backend
# status lines from the stats output instead of for each backend.
# collect_aggregates_only: True
#
# The (optional) collect_status_metrics parameter will instruct the
# check to collect metrics on status counts (e.g. haproxy.count_per_status)
# collect_status_metrics: True
#
# The (optional) collect_status_metrics_by_host parameter will instruct
# the check to collect status metrics per host instead of per service.
# This only applies if collect_status_metrics is True.
# collect_status_metrics_by_host: False
#
# The (optional) tag_service_check_by_host parameter will instruct the
# check to tag the service check status by host on top of other tags.
# The default case will only tag by backend and service.
# tag_service_check_by_host: False
#
# optional, filter metrics by services
# How it works: if a tag matches an exclude rule, it won't be included
# unless it also matches an include rule.
# e.g. include ONLY these two services
# services_include:
# - "backend"
# - "test"
# services_exclude:
# - ".*"
#
# OR include all EXCEPT this service
# services_include: []
# services_exclude:
# - "thisone"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment