Skip to content

Instantly share code, notes, and snippets.

View ncracker's full-sized avatar

Boyan Syarov ncracker

View GitHub Profile
@burnsie7
burnsie7 / log_redaction_examples.md
Created March 11, 2020 15:58
PII Log Redaction

Log Processing Rules

log_processing_rules:

Generic String: "sensitive-info"

  - type: exclude_at_match
    name: exclude_sensitive_info
    pattern: (?:sensitive\-info)
@burnsie7
burnsie7 / postgres.conf.yaml
Created January 27, 2020 21:59
Postgres yaml w/ custom and relations metrics
init_config:
instances:
- host: localhost
port: 5432
username: datadog
password: *****
dbname: postgres
tags:
- application:ClickandCollect
collect_function_metrics: true
@arogulin
arogulin / VortexRace3ForMac.md
Last active March 19, 2025 12:19
How to setup Vortex Race 3 keyboard for Mac and move Fn key to Home

How to setup Vortex Race 3 for Mac with latest (on 2020-01-05) firmare V1.02.05.

For better understanding we will use the following naming convention:

  [ L1 ][ L2 ][ L3 ][ Space ][ R1 ][ R2 ][ R3 ]
  1. Reset everything by pressing L3+R1 for 5 seconds. Left LED will blink white color while you're holding the keys. Release them after it stopeed blinking.
  2. Get into one of the programmable layers (R2+RShift) – I like red, the super bright laser LED is the least super annoying in red.
  3. Put the keyboard in Windows Mode (Pn+W), it's the least problematic one.
$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:
@jaycdave88
jaycdave88 / gist:70a85ed2bb185307dea9c467f1b45bba
Last active April 2, 2019 20:28
Windows Ansible script
- hosts: windows
roles:
- { role: Datadog.datadog }
vars:
datadog_api_key: [DATADOG_API_KEY]
@burnsie7
burnsie7 / ping_test.py
Last active September 19, 2018 19:51
PingCheck example
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:
@burnsie7
burnsie7 / multi_org_hosts_count.py
Created July 29, 2018 21:35
multi_org_hosts_count.py
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.
@DD-ScottBeamish
DD-ScottBeamish / cluster-role.yaml
Last active June 18, 2018 17:49
OpenShift 3.6 Development Environment w/RBAC
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: [""]
@DD-ScottBeamish
DD-ScottBeamish / config-map.yaml
Last active March 2, 2018 21:35
Setting up an OpenShift Development Environment Using MiniShift (Unrestricted)
kind: ConfigMap
apiVersion: v1
metadata:
name: dd-agent-config
namespace: myproject
data:
kubernetes: |-
init_config:
instances:
port: 4194