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 -e | |
# Check python 2.6 or greater | |
python -V 2>&1 | awk '$2 !~ /^2.[67]|^3/ {exit 1}' | |
# Download virtualenv | |
curl https://raw.github.com/pypa/virtualenv/master/virtualenv.py > virtualenv.py | |
python virtualenv.py $HOME/datadog | |
source $HOME/datadog/bin/activate | |
# Install dogapi | |
pip install dogapi | |
# Set up the dog alias |
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 "I'm busy doing work" | |
# produce widgets | |
count = produce_widgets | |
# Notify alq by email | |
echo "I'm done now and I made $count widgets" | mail [email protected] |
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 "I'm busy doing work" | |
# produce widgets | |
count = 100 | |
echo "I'm done now and I made $count widgets." | dog event post "$count Widgets produced" |
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
echo "@alq I'm done now and I made $count widgets." | dog event post "$count Widgets produced" |
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
dog metric post acme.widgets.count $count |
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 "I'm busy doing work" | |
# produce widgets | |
count = produce_widgets | |
# Notify @alq and post the event in the Datadog stream | |
echo "@alq I'm done now and I made $count widgets." | dog event post "$count Widgets produced" | |
# Post the metric | |
dog metric post acme.widgets.count $count |
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/sh | |
if [ -n "$DD_API_KEY" ]; then | |
apikey=$DD_API_KEY | |
fi | |
unamestr=`uname` | |
if [ $(which curl) ]; then | |
dl_cmd="curl -L -o" |
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 | |
# make sure dog cli is installed first | |
# sudo easy_install dogapi | |
# then run | |
# dog event post "My first post" "Yada yada yada" | |
# to make sure you're prompted for credentials | |
# which will be stored in $HOME/.dogrc | |
# Now let's test SMTP on localhost |
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
require 'rubygems' | |
require 'dogapi' | |
# Create a simple client | |
# The host is optional here, it's a shortcut to tie event and metrics to a given host | |
# | |
# You typically want to do: | |
# Dogapi::Client.new(your_actual_api_key_as_a_string, ...) | |
# We are using ENV to let you experiment via an environment variable. | |
dog = Dogapi::Client.new(ENV['DATADOG_KEY']) |
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
require 'rubygems' | |
require 'dogapi' | |
# Create a simple client | |
# The host is optional here, it's a shortcut to tie event and metrics to a given host | |
# | |
# You typically want to do: | |
# Dogapi::Client.new(your_actual_api_key_as_a_string, ...) | |
# We are using ENV to let you experiment via an environment variable. | |
dog = Dogapi::Client.new(ENV['DATADOG_KEY']) |