Skip to content

Instantly share code, notes, and snippets.

from checks import AgentCheck
from datadog import initialize, api
import requests
import simplejson as json
from pyHS100 import SmartBulb
import time
from datetime import datetime, timedelta
from threading import Thread
@remh
remh / php_fpm.py
Created December 19, 2016 21:29
php fpm check with SSL disabled
# (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# 3p
import requests
# project
from checks import AgentCheck
from util import headers
@remh
remh / Feeding Datadog With Graphite.md
Last active January 12, 2021 06:13
Feeding Datadog With Graphite

Deprecation notice

This method is deprecated, please reach out to the Datadog Support team if you have any questions.


def setUp(self):
c = Client(version='auto')
c.pull(REDIS_DOCKER_IMAGE)
self.containers = []
def create_cont(name, host_port, args=None, link=None):
if link:
host_conf = c.create_host_config(port_bindings={6379: host_port}, links=[(link,link)])
# stdlib
from collections import defaultdict
import re
import time
# 3rd party
import requests
# project
from checks import AgentCheck
#!/bin/sh
# figure out where to pull from
tag="master"
PIP_VERSION="6.0.6"
#######################
# Define some helpers #
#######################
#!/bin/sh
# Bail on errors
set -e
# We shouldn't have unbounded vars
set -u
#######################################################################
# SCRIPT KNOBS
#######################################################################
# Update for new releases, will pull this tag in the repo
FROM node
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python \
python-setuptools \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN easy_install requests
RUN npm install -g sprinter
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Wed Apr 22 03:12:04 2015
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
##
// Post a simple message
DogStatsd.Event("Daily script just finished", "It ran in 2h52m.");
// Send an error event
DogStatsd.Event("Unauthorized login detected”, "This should never happen", alertType: "error", tags: new[] { "urgent", "security" });