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
# TO_FOLDER=/something | |
# FROM=/your-es-installation | |
DATE=`date +%Y-%m-%d_%H-%M` | |
TO=$TO_FOLDER/$DATE/ | |
echo "rsync from $FROM to $TO" | |
# the first times rsync can take a bit long - do not disable flusing | |
rsync -a $FROM $TO | |
# now disable flushing and do one manual flushing |
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
{ | |
"client": { | |
"name": "sensu1a.us-east-1", | |
"address": "sensu1a.us-east-1", | |
"subscriptions": [ | |
"common", | |
"sensu" | |
], | |
"timestamp": 1352926088 | |
}, |
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
{ | |
"heroku": { | |
"auth_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", | |
"url": "http://example.com" | |
} | |
} |
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
diff --git a/lib/sensu/server.rb b/lib/sensu/server.rb | |
index 3d18f76..e63a399 100644 | |
--- a/lib/sensu/server.rb | |
+++ b/lib/sensu/server.rb | |
@@ -173,6 +173,12 @@ module Sensu | |
:handler => handler | |
}) | |
false | |
+ elsif event[:client].has_key?(:environment) && !handler.has_key?(:environments).include?(event[:client][:environment]) | |
+ @logger.debug('handler does not handle #{event[:client][:environment]} environment', { |
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
diff --git a/lib/sensu/server.rb b/lib/sensu/server.rb | |
index 360c7d8..78fb7e5 100644 | |
--- a/lib/sensu/server.rb | |
+++ b/lib/sensu/server.rb | |
@@ -175,6 +175,12 @@ module Sensu | |
false | |
elsif event[:action] == :resolve | |
true | |
+ elsif handler.has_key?(:occurrences) && handler.[:occurrences] > event[:occurrences] | |
+ @logger.debug('not enough occurrences to handle event', { |
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 ruby | |
require 'rubygems' | |
require 'mail' | |
require 'yaml' | |
require 'pp' | |
require 'json' | |
require 'gearman' | |
settings = YAML.load_file('/ssa/.settings') |
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
@@ -30,9 +30,16 @@ | |
@logger.fatal('SENSU NOT RUNNING!') | |
exit 2 | |
end | |
+ connection_auth_failure = Proc.new do | |
+ @logger.fatal('cannot auth to rabbitmq', { | |
+ :settings => @settings[:rabbitmq] | |
+ }) | |
+ @logger.fatal('SENSU NOT RUNNING!') | |
+ exit 2 |
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
adduser --home-dir /var/lib/logstash --no-create-home --shell /sbin/nologin logstash | |
mkdir -p /var/lib/logstash /var/log/logstash | |
chown -R logstash:logstash /var/lib/logstash /var/log/logstash |
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 | |
exec > /var/log/`basename ${0}`.log 2>&1 | |
echo "############ `date` ###########" | |
for bkdir in `cat /etc/fstab | egrep -v -e '^#' | egrep -e '[[:space:]]/backup' | awk '{print $2}'` ; do | |
mount | egrep -e '[[:space:]]'${bkdir}'[[:space:]]' > /dev/null | |
if [ $? == 0 ]; then | |
dir=`echo ${bkdir} | sed -e 's#/backup##' ` | |
[ "X${dir}" == "X" ] && dir="/" | |
mount | egrep -e '[[:space:]]'${dir}'[[:space:]]' > /dev/null |
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
input { | |
redis { | |
host => "log1a.us-east-1" | |
type => "apache-accesslog" | |
data_type => "list" | |
key => "logstash:apache:accesslog" | |
message_format => "json_event" | |
charset => "UTF-8" | |
db => 0 | |
debug => false |
OlderNewer