Skip to content

Instantly share code, notes, and snippets.

@burnsie7
burnsie7 / datadog-install-driver-only.sh
Created March 12, 2021 21:58
databricks agent install job clusters
#!/bin/bash
echo "Running on the driver? $DB_IS_DRIVER"
echo "Driver ip: $DB_DRIVER_IP"
cat <<EOF >> /tmp/start_datadog.sh
#!/bin/bash
echo "Running script"
@burnsie7
burnsie7 / datadog-install-driver-only.sh
Created March 12, 2021 21:52
databricks_install_agent_7
#!/bin/bash
echo "Running on the driver? $DB_IS_DRIVER"
echo "Driver ip: $DB_DRIVER_IP"
cat <<EOF >> /tmp/start_datadog.sh
#!/bin/bash
echo "Running script"
@burnsie7
burnsie7 / settings.py
Created May 14, 2020 01:19
basic django settings.py
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'redacted'
DEBUG = False
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '[::1]']
@burnsie7
burnsie7 / settings.py
Created May 14, 2020 01:19
basic django settings.py
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'redacted'
DEBUG = False
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '[::1]']
@burnsie7
burnsie7 / echo_json_udp.sh
Created April 10, 2020 02:00
echo json to udp
#!/bin/bash
__JSON='
{
"key1":"value1",
"key2":"value2"
}
'
echo $__JSON >/dev/udp/localhost/10518
@burnsie7
burnsie7 / tracing_w_nodejs.md
Last active April 8, 2020 13:47
Native Tracing w/ NodeJS

Create service and add dependencies

serverless create --template hello-world
npm init
npm install dd-trace@dev
npm install serverless-plugin-datadog

Install Lambda Forwarder

@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 / pricing_metrics.py
Created March 3, 2020 16:56
EC2 pricing metrics
"""
Disclaimer:
These projects are not a part of Datadog's subscription services and are provided for example purposes only
They are NOT guaranteed to be bug free and are not production quality
If you choose to use to adapt them for use in a production environment, you do so at your own risk.
"""
from datadog import statsd
costs = [['a1.medium',0.03], ['a1.large',0.05], ['a1.xlarge',0.1], ['a1.2xlarge',0.2], ['a1.4xlarge',0.41],
@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
@burnsie7
burnsie7 / Vagrantfile
Created November 9, 2019 21:58
k8s multinode vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
servers = [
{
:name => "k8s-head",
:type => "master",
:box => "ubuntu/xenial64",
:box_version => "20180831.0.0",
:eth1 => "192.168.205.10",