From c7e967f6b26a02378f799e5e17d039422e3bb4af Mon Sep 17 00:00:00 2001 From: Jan Broer Date: Mon, 7 Mar 2016 22:07:07 +0100 Subject: [PATCH] Add DataDog template --- templates/datadog/0/README.md | 13 +++++++ templates/datadog/0/docker-compose.yml | 14 ++++++++ templates/datadog/0/rancher-compose.yml | 42 +++++++++++++++++++++++ templates/datadog/catalogIcon-datadog.svg | 39 +++++++++++++++++++++ templates/datadog/config.yml | 8 +++++ 5 files changed, 116 insertions(+) create mode 100644 templates/datadog/0/README.md create mode 100755 templates/datadog/0/docker-compose.yml create mode 100755 templates/datadog/0/rancher-compose.yml create mode 100644 templates/datadog/catalogIcon-datadog.svg create mode 100755 templates/datadog/config.yml diff --git a/templates/datadog/0/README.md b/templates/datadog/0/README.md new file mode 100644 index 0000000..b141d24 --- /dev/null +++ b/templates/datadog/0/README.md @@ -0,0 +1,13 @@ +# DataDog Agent Service + +## Info +Based on the official [Datadog Agent Docker image](github.com/DataDog/docker-dd-agent) with a few changes to the init script to better support the Rancher environment. + +## Notable Improvements +* Hostname reported to DataDog is the actual name of the host (per Rancher Metadata service) +* User can specify host labels which will be sent to DataDog as key:value tags for the host +* User can either deploy the DogStat Agent globally on every host or deploy a single instance of a standalone DogStatsD +* The later is useful if you just want a StatsD aggregator to which other services can send metrics + +[Github repository for the image](https://github.com/janeczku/dd-agent-rancher) +[Docker Hub trusted image builds](https://hub.docker.com/r/janeczku/dd-agent-rancher) diff --git a/templates/datadog/0/docker-compose.yml b/templates/datadog/0/docker-compose.yml new file mode 100755 index 0000000..da22bbb --- /dev/null +++ b/templates/datadog/0/docker-compose.yml @@ -0,0 +1,14 @@ +datadog-agent: + image: janeczku/dd-agent-rancher:11.0.563 + restart: always + environment: + API_KEY: ${api_key} + DOGSTATSD_ONLY: ${statsd_standalone} + STATSD_METRIC_NAMESPACE: ${statsd_namespace} + HOST_LABELS: ${host_labels} + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /proc/:/host/proc/:ro + - /sys/fs/cgroup/:/host/sys/fs/cgroup:ro + labels: + io.rancher.scheduler.global: ${global_service} diff --git a/templates/datadog/0/rancher-compose.yml b/templates/datadog/0/rancher-compose.yml new file mode 100755 index 0000000..fdf3fc9 --- /dev/null +++ b/templates/datadog/0/rancher-compose.yml @@ -0,0 +1,42 @@ +.catalog: + name: "DataDog" + version: "11.0.563-rancher1" + description: "Datadog Agent and DogStatsD" + minimum_rancher_version: v0.46.0 + questions: + - variable: "api_key" + label: "DataDog Api Key" + description: "Your DataDog API key" + required: true + type: "string" + - variable: "host_labels" + label: "Host Labels to Tags" + description: | + Comma delimited list (no spaces) of host labels to set as DataDog key/value tags. + Example: 'provider,region' + required: false + type: "string" + - variable: "global_service" + label: "Global Service" + description: | + Enable this option to run an instance of the DataDog Agent on every host. + If you merely want a StatsD aggregator to which other services can send + metrics, then you may uncheck this and instead enable the Standalone mode. + required: true + type: "boolean" + default: true + - variable: "statsd_standalone" + label: "Standalone StatsD" + description: | + Enable this option to run only DogStatsD without the full Agent. + You can then send StatsD metrics to port 8125/udp of the service. + required: true + type: "boolean" + default: false + - variable: "statsd_namespace" + label: "StatsD Metric Namespace" + description: | + You may optionally set a namespace for all StatsD metrics aggregated by this service. + If set then 'metric.name' will become 'namespace.metric.name'. + required: false + type: "string" diff --git a/templates/datadog/catalogIcon-datadog.svg b/templates/datadog/catalogIcon-datadog.svg new file mode 100644 index 0000000..48947ad --- /dev/null +++ b/templates/datadog/catalogIcon-datadog.svg @@ -0,0 +1,39 @@ + + + + + + \ No newline at end of file diff --git a/templates/datadog/config.yml b/templates/datadog/config.yml new file mode 100755 index 0000000..51d3baa --- /dev/null +++ b/templates/datadog/config.yml @@ -0,0 +1,8 @@ +name: Datadog +description: | + Datadog Agent and DogStatsD +version: 11.0.563-rancher1 +category: Monitoring +maintainer: "Jan Broer " +license: The MIT License +projectURL: http://www.github.com/janeczku/dd-agent-rancher