https://github.com/seatgeek/datadog-service-helper
use consul catalog to manage datadog service checks
https://github.com/seatgeek/datadog-service-helper
Last synced: 3 months ago
JSON representation
use consul catalog to manage datadog service checks
- Host: GitHub
- URL: https://github.com/seatgeek/datadog-service-helper
- Owner: seatgeek
- Created: 2017-05-08T14:47:54.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-24T15:05:23.000Z (almost 7 years ago)
- Last Synced: 2024-06-20T16:50:22.956Z (11 months ago)
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 4
- Watchers: 101
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# datadog-service-helper
The purpose of this tool is to easy datadog service monitoring in a docker environment where services change port and host all the time.
The daemon will run on each server you have (e.g. through Nomad) and tail the local consul agents service catalog, and write DataDog agent configuration files, based on the catalog state.
## Usage
If a consul service has a tag called `dd-` the tool will ensure it will be monitored by the local DataDog agent.
Nomad example:
```hcl
service {
name = "datadog-service-helper"
port = "http"
tags = ["dd-go-expvar"]
}
```## Current service backends
### php-fpm
- `PHP_FPM_CONFIG_FILE` (default: `/etc/dd-agent/conf.d/php_fpm.yaml`) path to the dd-agent `php_fpm.yaml` file.
Required service tag `dd-php-fpm`
### go_expvar
- `GO_EXPVAR_CONFIG_FILE` (default: `/etc/dd-agent/conf.d/go_expvar.yaml`) path to the dd-agent `go_expvar.yaml` file.
Required service tag `dd-go-expvar`
### redis
- `REDIS_TARGET_FILE` (default: `/etc/dd-agent/conf.d/redis.yaml`) path to the dd-agent `redis.yaml` file.
Required service tag `dd-redis`
### TCP
- `TCP_CHECK_CONFIG_FILE` (default: `/etc/dd-agent/conf.d/tcp_check.yaml`) path to the dd-agent `tcp_check.yaml` file.
Required service tag `dd-tcp-check`
## Local development
To get the dependencies and first build, please run:
```
make install
```For easy Local development run
```
go install && \
DONT_RELOAD_DATADOG=1 \
GO_EXPVAR_CONFIG_FILE=go_expvar.yaml \
PHP_FPM_CONFIG_FILE=php_fpm.yaml \
REDIS_TARGET_FILE=redis.yaml \
CONSUL_HTTP_ADDR=:8500 \
datadog-fpm-monitor
```