- Create Pushover account
- Create a new Application in the Pushover site.
- You should now have a token and user id. You will need this for the webhook
- Go to the Datadog webhooks integration
- Enter Pushover for the name.
- Under URL enter `https://api.pushover.net/1/messages.json?token=YOURPUSHOVERAPPTOKEN&user=YOURPUSHOVERUSERID
- Under Custom Payload, enter
{"title":"$EVENT_TITLE","message":"$EVENT_MSG"}
- Check both Use Custom Payload and Encode as form
- Create a monitor that notifies @webhook-pushover
- Boom, you are done
This file contains hidden or 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
local appfinder = require "hs.appfinder" | |
local app = require "hs.application" | |
local alive1 = hs.image.imageFromPath("~/bin/alive1.png") | |
local alive2 = hs.image.imageFromPath("~/bin/alive2.png") | |
alive = hs.menubar.new() | |
if alive then | |
alive:setIcon(alive2,false) | |
end | |
function updateAlive() |
This file contains hidden or 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
https://github.com/dockersamples - Docker Compose and Swarm Samples | |
https://github.com/kubernetes/kubernetes/tree/master/examples - Example apps for K8s | |
https://github.com/elastic/examples | |
https://github.com/reactjs/redux/tree/master/examples | |
https://github.com/googlesamples | |
https://github.com/serverless/examples | |
https://github.com/graphcool-examples | |
https://github.com/RestDB/clientexamples | |
https://github.com/oracle/oracle-db-examples | |
https://github.com/electron/simple-samples |
This file contains hidden or 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
$(function() { | |
var margin = { top: 300, right: 100, bottom: 100, left: 100 }, | |
width = 1400 - margin.right - margin.left, | |
height = 1080 - margin.top - margin.bottom; | |
var parseTime = d3.timeParse("%H:%M:%S"); | |
var x = d3.scaleTime().range([0, width]); | |
var y = d3.scaleLinear().range([height, 0]); | |
var log2y = d3.scaleLinear().range([height, 0]); |
This file contains hidden or 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
- hosts: manager | |
become: yes | |
tasks: | |
- name: Initialize Docker Swarm | |
shell: docker swarm init --advertise-addr {{ ansible_eth1.ipv4.address}} | |
- hosts: manager | |
become: no | |
tasks: | |
- name: Capture Docker Swarm Join Command |
This file contains hidden or 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
while sleep `shuf -i 0-10 -n 1`; do sudo stress -c `shuf -i 1-4 -n 1` -m `shuf -i 1-2 -n 1` -d `shuf -i 1-5 -n 1` -i `shuf -i 0-4 -n 1` -t `shuf -i 0-20 -n 1`s; done |
This file contains hidden or 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
""" | |
Thanks to gane5h for the original script. this is a small kludgy tweak to that one. | |
Custom parser for nginx log suitable for use by Datadog 'dogstreams'. | |
To use, add to datadog.conf as follows: | |
dogstreams: [path to ngnix log (e.g: "/var/log/nginx/access.log"]:[path to this python script (e.g "/usr/share/datadog/agent/dogstream/nginx.py")]:[name of parsing method of this file ("parse")] | |
so, an example line would be: | |
dogstreams: /var/log/nginx/access.log:/usr/share/datadog/agent/dogstream/nginx.py:parse | |
Log of nginx should be defined like that: | |
log_format time_log '$time_local "$request" S=$status $bytes_sent T=$request_time R=$http_x_forwarded_for'; | |
when starting dd-agent, you can find the collector.log and check if the dogstream initialized successfully |
This file contains hidden or 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
1) Go to https://github.com/jkbrzt/httpie to get the full instructions on its use | |
2) Install it: brew install httpie | |
3) If you are on a Mac and have not upgraded your Python version install other stuff: | |
pip install --upgrade pyopenssl pyasn1 ndg-httpsclient | |
(I have the new 15" MBP with force touch trackpad so its as new as they get and I had to install this) | |
4) Use it.... | |
If trying to use this to look at Docker Stats API, the command to use is going to be: |
This file contains hidden or 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
from dogapi import dog_http_api as api | |
import console | |
import json | |
from StringIO import StringIO | |
api.api_key = 'apikey' | |
api.application_key = 'appkey' | |
board_id = console.input_alert('enter screenboard id') |
This file contains hidden or 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/zsh | |
# set cron to run this every couple of minutes and it will shutdown boot2docker | |
# when its been running with no processes for maxminutes | |
maxminutes=10 | |
local bdout | |
local dpqout | |
bdout=$(boot2docker status) 2>/dev/null | |
if [[ $bdout = "running" ]]; then | |
echo "boot2docker running" |