Skip to content

Instantly share code, notes, and snippets.

View ncracker's full-sized avatar

Boyan Syarov ncracker

View GitHub Profile
id: waf
metric_id: amazon-waf
facets:
-
name: Action
source: log
path: system.action
groups:
- System
-
id: nginx
metric_id: nginx
facets:
-
name: Status Code
source: log
path: http.status_code
groups:
- Web Access
-
id: apigateway
metric_id: amazon-api-gateway
facets:
-
name: Status Code
source: log
path: http.status_code
groups:
- Web Access
-
{{ if .Common }}
#########################
## Basic Configuration ##
#########################
## @param api_key - string - required
## The Datadog API key to associate your Agent's data with your organization.
## Create a new API key here: https://app.datadoghq.com/account/settings
#
api_key: {{ YOUR_API_KEY_HERE }}
{
"ipcMode": null,
"executionRoleArn": "arn:aws:iam::172597598159:role/ecsTaskExecutionRole",
"containerDefinitions": [
{
"dnsSearchDomains": null,
"environmentFiles": null,
"logConfiguration": {
"logDriver": "awslogs",
"secretOptions": null,
docker run -d -v ~/opt/couchbase/var/lib/couchbase/logs/*.log --restart always --name db -p 8091-8094:8091-8094 -p 11210:11210 -l com.datadoghq.ad.check_names='["couchbase"]' -l com.datadoghq.ad.init_configs='[{}]' -l com.datadoghq.ad.instances='[{"server":"http://%%host%%:8091","query_monitoring_url":"http://%%host%%:8093","username":"Administrator","password":"admin123"}]' -l com.datadoghq.ad.logs='[{"source":"couchbase", "service":"db"}]' couchbase
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: myApp
spec:
replicas: 2
template:
metadata:
name: myApp
labels:
#BROKEN - DON'T USE
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: datadog-agent
spec:
selector:
matchLabels:
app: datadog-agent
template:
#!/usr/bin/env python
import socket
import json
import time
import ssl
host = "intake.logs.datadoghq.com"
ssl_port = 10516
ddApiKey = "API_KEY"
dd_source = "MY_SOURCE"
# Datadog Docker agent
# - live processes enabled
# - logs enabled & proxied
# - using a proxy (see proxy docs > https://docs.datadoghq.com/agent/proxy/?tab=agentv6)
DOCKER_CONTENT_TRUST=1 docker run -d --name dd-agent --restart=always \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \