• Stars
    star
    197
  • Rank 197,722 (Top 4 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created almost 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Miscellaneous scripts and tools

Miscellany

Intended to be a repository for miscellaneous scripts and tools from Datadog to be shared with the public.

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.

Contributing

When adding a new script/tool, be sure to do the following:

  • Open a PR for review
  • Add a link and description to one of the tables above

We encourage creating a subfolder with a separate README that gives more details on the script/tool.

Scripts & Tools

These scripts and tools live in this repo, some scripts/tools have their own README in their subfolder with further explaintation and usage.

Name Language Function
count_hosts_by_tag Python This script will return the number of hosts with a given tag applied. If the tag is only the key of a key:value pair, all related values will be counted.
mute_monitors_with_tags Python This script mutes all monitors that are tagged with a set of monitor tags
linux_odfs_API Bash Script to capture linux open file descriptor metrics
query_freshness Python Report the "freshness" (how long ago a metric was submitted) of a metric. See this KB for more info
custom_check_shell Python/Bash Spins up a VM using vagrant that installs the Datadog agent on it with a simple custom check using shell
empty_dash Python Creates an empty dashboard for test purposes
get_all_boards Python Gets all boards for a given organization and print out their json. Useful for malformed boards created via the API
Remove old dashboards & monitors Python Will remove all old dashboards and monitors from an account belonging to the email as specified in the script's parameter.
get_hostname_agentversion Python Gets the version of the agent running for each host
s3_permissions Python Checks S3 bucket ACL permissions for read/write access and reports a metric to Datadog
uptime Python Custom check to track uptime. At the time that this check was written, it wasn't possible to view a monitor's uptime on a dashboard or via the API, or to view uptime with multiple decimals of precision, but please check if those features are available before using this check.
api_limits_as_custom_metrics Python Gets the Datadog API rate limits from the Datadog API and submits them as metrics
cross-org-metric-broker Python Takes metrics from one account (org) and posts them to another account (org)
csvmod Python Example script of grabbing a timeseries and dumping to a CSV
dashconverter Python Convert from screenboard to timeboard and vice versa
metric_usage_report Python Enter a list of metrics, and receive a report showing where the metrics are used in your account
dd_public_ip Bash Script to run from an AWS instance that will add a tag for the public ip
fullmetrics_dash Python Creates a dashboard for a given integration with all metrics being reported through that integration
hosts_with_aws_without_agent Python List of ec2 instances without the datadog-agent installed
merge_screenboards Python Takes two screenboards and combines them into one
migrate_dashboard Python Migrate a screenboard from one account (or org) to another
migrate_monitors Python Migrate monitors by query from one account (or org) to another
dash_to_json Python Convert Dashboard to JSON and Create Dashboard from JSON
import_screenboard Python Creates a new screenboard from json
export_screenboard Python Exports a single screenboard to a json file
base_scripts Python A collection of generic scripts that can be used as a starting point for creating your own custom scripts
remove_lingering_aws_host_tags Python This is a tool for removing AWS host-level tags from your infrastructure in Datadog. It is intended for users who have removed their EC2 instances from their AWS integration and if they no longer want to see AWS tags associated with the hosts that still run datadog-agents.
remove_single_tag_tmp Python Removes a single tag from a host
update_multiple_monitors_example Python example of how to update multiple monitors at once
create_monitor Python simple example of creating metric query monitor with thresholds
weatherExample Python Example script that submits the temperature and wind speed from the Wunderground API to Datadog as metrics
sql_redacted Python Submits a metric based on a SQL query
multi_org_create_users Python Creates multiple Datadog users across multiple Datadog Orgs
create_monitor_terraform Terraform Creates a monitor using Terraform
query hosts and create tags Python queries hosts api using pagination and creates new tags
get all groups in a monitor Python queries for all groups in a monitor and outputs a list of them
create a csv file with a list of log in handles Python creates a CSV file in the same directory as the script containing a list of all user log in handles
Powershell script to call JSON REST endpoint, pass those key-value pairs to DogstatsD Powershell A Powershell script which will call a given HTTP GET endpoint, and then submit the key-value pairs found in the resulting JSON body to DogsStatsD. Resource endpoint must be a non-nested JSON body ({"a":"1","b":"2"} -> custom metrics: a|1, b|2
Dogmover Python Migrate screenboards, timeboards and monitors from one organization to another (supports migrations between US>EU instances.)
Update Host Tags with Host Metadata (example) Python Queries the host API then creates tags based off of the gohai (or other) metadata.
Historic usage to CSV Python This script is meant to pull historical usage metrics and export them to CSV.
dd_aws_add_account.py Python script for creating aws integration
Send_filesystem_events Python This script uses inotify to send an event to the event stream when it detects a change in files or folders in a given directory.
create_users_and_emails_list.py Python script to get a list of user emails as csv
DD User Report (JSON) Python Generates various different user reports and pretty prints the json for further processing -- useful for large orgs with 100s or 1000s or users
Get All Public Dashboards Python Gets a full list (returned as JSON) of all dashboards that are public for a given organization
Get All Child Orgs Python Gets a full list (returned as JSON) of all child organizations for a given organization
PySNMP-MIB-Parser Python Converts a MIB file (in PySNMP format) to a yaml file that can be used by Datadog's SNMP agent integration
aws_hosts_without_agent.py Python Gets a list of hostnames and IPs for AWS hosts not running the agent
DD Example N/A Spins up a k8s cluster using Minikube with a simple app and database, showcasing the Datadog daemonset, has APM, Logs, and Metrics
get_active_users Python Collects a list of all active (ie. non disabled or pending) users in an organization to a csv file.
Packer Image Build + Terraform Deploy with AWS Secrets Manager and Datadog Agent N/A A guide that helps you to build an AMI with updates + Datadog Agent preinstalled using Packer, and deploy to AWS using Terraform while storing your Datadog API key in AWS Secrets Manager and using an IAM Instance Profile to retrive it at deployment time.
ddog Java 1.8+ A command line tool to troubleshoot connectivity issues for on-premises environments. Ping, SendMetric, SendLog and SendTrace are the available commands.
webhooks N/A A collection of Webhooks examples which use the Datadog API to perform different actions
Metrics Without Limits Optimiser Python Run through your custom metrics to apply a MWL allowlist of tags and aggregations to a metric based on whether the tags/aggregations have been actively queried on by dashboards, notebooks, monitors, and through the API in the past 30 day and only if the resulting volume of this new config is less than not using MWL.

Additional tools

These are some additional tools and scripts written by Datadog.

Name Language Function
csv_exporter Python Exports a given metric from Datadog as a csv

Getting started

For any Python code, you'll want to run:

pip install datadog

More Repositories

1

go-profiler-notes

felixge's notes on the various go profiling methods that are available.
Jupyter Notebook
3,255
star
2

glommio

Glommio is a thread-per-core crate that makes writing highly parallel asynchronous applications in a thread-per-core architecture easier for rustaceans.
Rust
3,076
star
3

datadog-agent

Main repository for Datadog Agent
Go
2,859
star
4

stratus-red-team

☁️ ⚡ Granular, Actionable Adversary Emulation for the Cloud
Go
1,752
star
5

dd-agent

Datadog Agent Version 5
Python
1,291
star
6

integrations-core

Core integrations of the Datadog Agent
Python
917
star
7

KubeHound

Tool for building Kubernetes attack paths
Go
737
star
8

zstd

Zstd wrapper for Go
C
732
star
9

dd-trace-go

Datadog Go Library including APM tracing, profiling, and security monitoring.
Go
659
star
10

dd-trace-js

JavaScript APM Tracer
JavaScript
636
star
11

the-monitor

Markdown files for Datadog's longform blog posts: https://www.datadoghq.com/blog/
Python
613
star
12

guarddog

🐍 🔍 GuardDog is a CLI tool to Identify malicious PyPI and npm packages
Python
588
star
13

datadogpy

The Datadog Python library
Python
575
star
14

dd-trace-py

Datadog Python APM Client
Python
519
star
15

dd-trace-java

Datadog APM client for Java
Java
500
star
16

yubikey

YubiKey at Datadog
Shell
494
star
17

dd-trace-php

Datadog PHP Clients
PHP
491
star
18

kafka-kit

Kafka storage rebalancing, automated replication throttle, cluster API and more
Go
485
star
19

documentation

The source for Datadog's documentation site.
HTML
471
star
20

dd-trace-dotnet

.NET Client Library for Datadog APM
C#
443
star
21

security-labs-pocs

Proof of concept code for Datadog Security Labs referenced exploits.
Shell
355
star
22

go-python3

Go bindings to the CPython-3 API
Go
344
star
23

helm-charts

Helm charts for Datadog products
Go
344
star
24

datadog-go

go dogstatsd client library for datadog
Go
332
star
25

terraform-provider-datadog

Terraform Datadog provider
Go
329
star
26

datadog-serverless-functions

Repo of AWS Lambda and Azure Functions functions that process streams and send data to Datadog
Python
326
star
27

docker-dd-agent

Datadog Agent Dockerfile for Trusted Builds.
Roff
302
star
28

browser-sdk

Datadog Browser SDK
TypeScript
302
star
29

datadog-operator

Kubernetes Operator for Datadog Resources
Go
301
star
30

ansible-datadog

Ansible role for Datadog Agent
Jinja
299
star
31

dd-trace-rb

Datadog Tracing Ruby Client
Ruby
261
star
32

threatest

Threatest is a CLI and Go framework for end-to-end testing threat detection rules.
Go
260
star
33

integrations-extras

Community developed integrations and plugins for the Datadog Agent.
Python
252
star
34

watermarkpodautoscaler

Custom controller that extends the Horizontal Pod Autoscaler
Go
210
star
35

pupernetes

Spin up a full fledged Kubernetes environment designed for local development & CI
Go
201
star
36

dd-sdk-ios

Datadog SDK for iOS - Swift and Objective-C.
Swift
195
star
37

php-datadogstatsd

A PHP client for DogStatsd
PHP
185
star
38

java-dogstatsd-client

Java statsd client library
Java
175
star
39

sketches-go

Go implementations of the distributed quantile sketch algorithm DDSketch
Go
167
star
40

dogstatsd-ruby

A Ruby client for DogStatsd
Ruby
166
star
41

dd-sdk-android

Datadog SDK for Android (Compatible with Kotlin and Java)
Kotlin
150
star
42

chaos-controller

🐒 🔥 Datadog Failure Injection System for Kubernetes
C
142
star
43

kvexpress

Go program to move data in and out of Consul's KV store.
Go
128
star
44

HASH

HASH (HTTP Agnostic Software Honeypot)
JavaScript
128
star
45

malicious-software-packages-dataset

An open-source dataset of malicious software packages found in the wild, 100% vetted by humans.
Python
125
star
46

ebpf-manager

This manager helps handle the life cycle of your eBPF programs
Go
118
star
47

docker-compose-example

A working example of using Docker Compose with Datadog
Python
116
star
48

orchestrion

Automatic compile-time instrumentation of Go code
Go
115
star
49

dd-sdk-reactnative

Datadog SDK for ReactNative
TypeScript
115
star
50

trace-examples

trace sample apps
Python
113
star
51

sketches-java

DDSketch: A Fast and Fully-Mergeable Quantile Sketch with Relative-Error Guarantees.
Java
113
star
52

datadog-lambda-js

The Datadog AWS Lambda Library for Node
TypeScript
105
star
53

gohai

System information collector
Go
102
star
54

build-plugins

A set of universal bundler plugins to interact with Datadog directly from your builds.
TypeScript
101
star
55

jmxfetch

Export JMX metrics
Java
98
star
56

chef-datadog

Chef cookbook for Datadog Agent & Integrations
Ruby
97
star
57

piecewise

Functions for piecewise regression on time series data
Python
96
star
58

extendeddaemonset

Kubernetes Extended Daemonset controller
Go
96
star
59

datadog-static-analyzer

Datadog Static Analyzer
Rust
96
star
60

datadog-api-client-go

Golang client for the Datadog API
Go
95
star
61

ansible-datadog-callback

Ansible callback to get stats & events directly into Datadog http://datadoghq.com
Python
94
star
62

dogstatsd-csharp-client

A DogStatsD client for C#/.NET
C#
94
star
63

gostackparse

Package gostackparse parses goroutines stack traces as produced by panic() or debug.Stack() at ~300 MiB/s.
Go
94
star
64

dogapi-rb

Ruby client for Datadog's API
Ruby
92
star
65

redux-doghouse

Scoping helpers for building reusable components with Redux
JavaScript
90
star
66

ecommerce-workshop

Example eCommerce App for workshops and observability
Ruby
89
star
67

serverless-plugin-datadog

Serverless plugin to automagically instrument your Lambda functions with Datadog
TypeScript
87
star
68

ebpfbench

## Auto-archived due to inactivity. ## profile eBPF programs from Go
Go
87
star
69

datadog-ci

Use Datadog from your CI.
TypeScript
85
star
70

sketches-py

Python implementations of the distributed quantile sketch algorithm DDSketch
Python
83
star
71

datadog-lambda-python

The Datadog AWS Lambda Layer for Python
Python
83
star
72

ddqa

Datadog's QA manager for releases of GitHub repositories
Python
82
star
73

datadog-api-client-typescript

Typescript client for the Datadog API
TypeScript
77
star
74

dirtypipe-container-breakout-poc

Container Excape PoC for CVE-2022-0847 "DirtyPipe"
77
star
75

datadog-trace-agent

Datadog Trace Agent archive (pre-6.10.0)
70
star
76

heroku-buildpack-datadog

Heroku Buildpack to run the Datadog Agent in a Dyno
Shell
69
star
77

datadog-lambda-extension

Rust
68
star
78

datadog-api-client-python

Python client for the Datadog API
Python
68
star
79

datadog-cdk-constructs

CDK construct library to automagically instrument your Lambda functions with Datadog
TypeScript
65
star
80

lading

A suite of data generation and load testing tools
Rust
64
star
81

jsonapi

A marshaler/unmarshaler for JSON:API.
Go
62
star
82

datadog-api-client-java

Java client for the Datadog API
Java
61
star
83

managed-kubernetes-auditing-toolkit

All-in-one auditing toolkit for identifying common security issues in managed Kubernetes environments. Currently supports AWS EKS.
Go
60
star
84

datadog-lambda-go

The Datadog AWS Lambda package for Go
Go
59
star
85

serilog-sinks-datadog-logs

Serilog Sink that sends log events to Datadog https://www.datadoghq.com/
C#
53
star
86

puppet-datadog-agent

Puppet module to install the Datadog agent
Ruby
50
star
87

effective-dashboards

A curated list of useful Datadog dashboards and Dashboard design best practices
47
star
88

opencensus-go-exporter-datadog

Datadog exporter for OpenCensus metrics
Go
47
star
89

gello

## Auto-archived due to inactivity. ## :octocat: A self-hosted server for managing Trello cards based on GitHub webhook events
Python
45
star
90

datadog-cloudformation-resources

Python
44
star
91

ebpf-training

Go
44
star
92

dd-sdk-flutter

Flutter bindings and tools for utilizing Datadog Mobile SDKs
Dart
43
star
93

jenkins-datadog-plugin

ARCHIVED: Current repository is now located https://github.com/jenkinsci/datadog-plugin
Java
42
star
94

synthetics-ci-github-action

Use Browser and API tests in your CI/CD with Datadog Continuous Testing
TypeScript
41
star
95

dd-opentracing-cpp

Datadog Opentracing C++ Client
C++
40
star
96

rum-react-integration-examples

rum-react-integration
TypeScript
39
star
97

fluent-plugin-datadog

Fluentd output plugin for Datadog: https://www.datadog.com
Ruby
38
star
98

datadog-sync-cli

Datadog cli tool to sync resources across organizations.
Python
38
star
99

ddprof

The Datadog Native Profiler for Linux
C++
36
star
100

cloudformation-template

Easily set up the Datadog AWS integration using CloudFormation
Shell
34
star