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
############## | |
# Kill queries running over 5mins | |
# Author: Mark Poole <mark@parsable.com> | |
import psycopg2 | |
from time import sleep | |
db_host='' | |
db_user='' | |
db_pass='' |
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
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
# | |
# check-bucardo | |
# | |
# DESCRIPTION: | |
# Check bucardo status | |
# | |
# OUTPUT: | |
# check status (ok or critical) |
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
### Keybase proof | |
I hereby claim: | |
* I am reedox on github. | |
* I am poole (https://keybase.io/poole) on keybase. | |
* I have a public key whose fingerprint is 0007 9AFE 2470 0CF8 6133 9ACB 0047 1C8E 90A7 5EAC | |
To claim this, I am signing this object: |
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
#include <netdb.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#define CANARY "in_the_coal_mine" | |
struct { | |
char buffer[1024]; |
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
Time Event | |
3/26/14 | |
6:13:07.217 PM | |
[2014-03-26 18:13:07,217][WARN ][monitor.jvm ] [node.company.net] [gc][old][740388][8643] duration [13.1s], collections [1]/[13.2s], total [13.1s]/[1.1h], memory [11.7gb]->[11.7gb]/[11.7gb], all_pools {[young] [260.9mb]->[265.8mb]/[266.2mb]}{[survivor] [0b]->[0b]/[33.2mb]}{[old] [11.4gb]->[11.4gb]/[11.4gb]} | |
host = node.company.net source = /var/log/elasticsearch/companyapp.log sourcetype = elasticsearch_companyapp_log | |
3/26/14 | |
6:12:53.922 PM | |
[2014-03-26 18:12:53,922][INFO ][monitor.jvm ] [node.company.net] [gc][old][740387][8642] duration [9.9s], collections [1]/[10s], total [9.9s]/[1.1h], memory [11.7gb]->[11.7gb]/[11.7gb], all_pools {[young] [266.2mb]->[260.9mb]/[266.2mb]}{[survivor] [3.5mb]->[0b]/[33.2mb]}{[old] [11.4gb]->[11.4gb]/[11.4gb]} | |
host = node.company.net source = /var/log/elasticsearch/companyapp.log sourcetype = elasticsearch_companyapp_log |
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
$ npm --registry http://npm.xxx install | |
npm http GET https://registry.npmjs.org/bugsnag/-/bugsnag-1.0.2.tgz | |
npm http GET https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-0.3.2.tgz | |
npm http GET https://registry.npmjs.org/xml2js/-/xml2js-0.1.14.tgz | |
npm http GET https://registry.npmjs.org/monk/-/monk-0.1.7.tgz | |
npm http GET https://registry.npmjs.org/mongodb/-/mongodb-1.3.19.tgz | |
npm http GET https://registry.npmjs.org/braintree/-/braintree-1.9.1.tgz | |
npm http GET https://registry.npmjs.org/npid/-/npid-0.3.2.tgz | |
npm http GET https://registry.npmjs.org/underscore/-/underscore-1.3.3.tgz | |
npm http GET https://registry.npmjs.org/once/-/once-1.3.0.tgz |
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
#!/usr/bin/python | |
# Checks health of percona cluster node via upstart | |
import os, socket, subprocess | |
sock_fd = socket.fromfd(int(os.environ["UPSTART_FDS"]), | |
socket.AF_INET, socket.SOCK_STREAM) | |
conn, addr = sock_fd.accept() | |
reply="moo" |