serverless create --template hello-world
npm init
npm install dd-trace@dev
npm install serverless-plugin-datadog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
__JSON=' | |
{ | |
"key1":"value1", | |
"key2":"value2" | |
} | |
' | |
echo $__JSON >/dev/udp/localhost/10518 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init_config: | |
instances: | |
- host: localhost | |
port: 5432 | |
username: datadog | |
password: ***** | |
dbname: postgres | |
tags: | |
- application:ClickandCollect | |
collect_function_metrics: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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", |
NewerOlder