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/bash | |
# herein we backup our indexes! this script should run at like 6pm or something, after logstash | |
# rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas, | |
# compress the data files, create a restore script, and push it all up to S3. | |
TODAY=`date +"%Y.%m.%d"` | |
INDEXNAME="logstash-$TODAY" # this had better match the index name in ES | |
INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/" | |
BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put" | |
BACKUPDIR="/mnt/es-backups/" | |
YEARMONTH=`date +"%Y-%m"` |
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/sh | |
# Do elasticsearch optimize on logstash previous day index | |
# if $1 = all then optimize all indicies | |
esindex="/opt/elasticsearch/data/elasticsearch/nodes/0/indices" | |
# Grab yesterday's values | |
D=`date +%d -d yesterday` | |
M=`date +%m -d yesterday` | |
Y=`date +%Y -d yesterday` |
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/sh | |
cd /usr/local/src | |
wget https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2 | |
wget https://github.com/n1k0/casperjs/tarball/1.0.2 | |
tar xvjpf phantomjs-1.9.0-linux-x86_64.tar.bz2tar zxvf 1.0.2ln -s /usr/local/src/phantomjs-1.9.0-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs | |
ln -s /usr/local/src/n1k0-casperjs-bc0da16/bin/casperjs /usr/local/bin/casperjs | |
phantomjs --version | |
casperjs --version |
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
{% for hostname in pillar['remote_hosts'] %} | |
sh.rsync('-tdz', '--delete-after', '/home/stats/', '{{ hostname }}:/home/stats/') | |
{% endfor %} |
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
datadog_repo: | |
pkgrepo: | |
- managed | |
- name: deb http://apt.datadoghq.com/ unstable main | |
- keyserver: keyserver.ubuntu.com | |
- keyid: C7A7DA52 | |
datadog-agent: | |
pkg: | |
- installed |
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
datadog-repo: | |
pkgrepo: | |
- managed | |
- humanname: "DataDog Agent" | |
- name: deb http://apt.datadoghq.com/ unstable main | |
- keyserver: keyserver.ubuntu.com | |
- keyid: C7A7DA52 | |
- file: /etc/apt/sources.list.d/datadog.list | |
datadog-pkg: |
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
#!/usr/bin/env python | |
import re | |
import os | |
import logging | |
import argparse | |
import pyinotify | |
import subprocess | |
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
<phpunit | |
colors="true" | |
verbose="true" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
stopOnFailure="true" | |
backupGlobals="true" | |
convertWarningsToExceptions="true"> | |
<testsuites> | |
<testsuite name="all"> |
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
untitled text 3.txt | |
untitled text 31.txt | |
#!/usr/bin/env python | |
import boto | |
import argparse | |
import time, datetime, sys, logging, socket, re | |
from dateutil.relativedelta import relativedelta | |
def get_creds(): |
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
<filter> | |
<whitelist> | |
<directory suffix=".php">sites</directory> | |
<directory suffix=".inc">sites</directory> | |
<directory suffix=".install">sites</directory> | |
<directory suffix=".module">sites</directory> | |
<directory suffix=".php">profiles</directory> | |
<directory suffix=".inc">profiles</directory> | |
<directory suffix=".install">profiles</directory> | |
<directory suffix=".module">profiles</directory> |