log_processing_rules:
- type: exclude_at_match
name: exclude_sensitive_info
pattern: (?:sensitive\-info)
init_config: | |
instances: | |
- host: localhost | |
port: 5432 | |
username: datadog | |
password: ***** | |
dbname: postgres | |
tags: | |
- application:ClickandCollect | |
collect_function_metrics: true |
For better understanding we will use the following naming convention:
[ L1 ][ L2 ][ L3 ][ Space ][ R1 ][ R2 ][ R3 ]
$TRACE_ID=($RANDOM % 1000000) | |
$SPAN_ID=($RANDOM % 1000000) | |
$START=$(date +%s%N) | |
sleep 2 | |
$DURATION=$(($(date +%s%N) - $START)) | |
$headers = @{"Content-Type" = "application/json"} | |
$url = "http://localhost:8126/v0.3/traces" | |
$parm = @{"trace_id"=$TRACE_ID; "span_id"=$SPAN_ID; "name"='azuretest'; "resource"='/home'; "service"='none'; | |
"type"='web'; "start"=$START; "duration"=$DURATION } |
- hosts: windows | |
tasks: | |
- name: get dotnet tracer | |
win_get_url: | |
url: 'https://github.com/DataDog/dd-trace-dotnet/releases/download/v1.1.0/DatadogDotNetTracing-1.1.0-x64.msi' | |
dest: 'C:\datadog_dotnet_v1.1.0.msi' | |
- name: install datadog tracer msi file | |
win_msi: |
- hosts: windows | |
roles: | |
- { role: Datadog.datadog } | |
vars: | |
datadog_api_key: [DATADOG_API_KEY] |
from checks import AgentCheck | |
import os | |
''' | |
This is for demostration purposes only and not recommended for production use. | |
Because of the nature of ping, it could result in a very long running check if there are excessive timeouts. | |
Long running checks could potentially result in other metrics and checks being skipped. | |
Example conf.yaml: |
import datetime | |
import time | |
import requests | |
import simplejson | |
from datadog import initialize, api | |
""" | |
This script gives a real time report on ec2 and Datadog agent host usage | |
from multiple organizations and reports them up to the 'main' parent account. |
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
name: datadog | |
rules: | |
- nonResourceURLs: | |
- "/version" # Used to get apiserver version metadata | |
- "/healthz" # Healthcheck | |
verbs: ["get"] | |
- apiGroups: [""] |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: dd-agent-config | |
namespace: myproject | |
data: | |
kubernetes: |- | |
init_config: | |
instances: | |
port: 4194 |