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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin | |
DESC="Uchiwa Sensu Dashboard" | |
UCHIWA_USER=uchiwa | |
DAEMON=/opt/uchiwa/embedded/bin/node | |
CONFIG="/etc/sensu/uchiwa.js" |
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
on a per check level granularity during subdue period | |
(1) ability to say that handlers will handle only certain severities | |
(2) ability to override handlers | |
while (1) & (2) could be speficied together or separately for example check could possibly be defined like this | |
{ | |
"checks": { | |
"noisy_noncritical_check": { | |
"command": "queues_are_hard_to_monitor.rb", | |
"handlers": "some_handler" |
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
mkdir download /tmp/installdir; cd download; | |
curl -LO http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz | |
tar xf Python-2.7.6.tgz | |
cd Python-2.7.6 | |
yum -y install openssl-devel.x86_64 readline-devel.x86_64 bzip2-devel.x86_64 sqlite-devel.x86_64 zlib-devel.x86_64 ncurses-devel.x86_64 db4-devel.x86_64 expat-devel.x86_64 rpm-build.x86_64 | |
env CC=gcc44 CXX=g++44./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared --enable-ipv6 | |
make -j2 | |
make install DESTDIR=/tmp/installdir | |
echo '/sbin/ldconfig' > /tmp/installdir/run-ldconfig.sh | |
fpm -s dir -t rpm -n python27 -v 2.7.6 -C /tmp/installdir \ |
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 | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin | |
DESC="Logstash Daemon" | |
LOGSTASH_USER=logstash | |
DAEMON=/usr/bin/java | |
CONFIGDIR="/etc/logstash/conf.d" |
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
curl -XPUT localhost:9200/apache-accesslog-2013.10.24/apache-accesslog/_mapping -d '{ | |
"apache-accesslog": { | |
"properties":{ | |
"@fields": { | |
"properties": { | |
"extra" : { | |
"type" : "object", | |
"dynamic" : "true", | |
"include_in_all" : true | |
} |
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
http://localhost:8080/render/?height=700&width=1200&from=-6h&title=Cassandra Heap& | |
lineMode=slope&areaMode=none&drawNullAsZero=false&hideLegend=false& | |
target=metrics.cassandra.dsc1a.internal.heap.total& | |
target=metrics.cassandra.dsc1a.internal.heap.used& | |
target=stacked(group( | |
sumSeries(metrics.cassandra.dsc1a.internal.PRODUCTION.*.memtable_data_size), | |
sumSeries(metrics.cassandra.dsc1a.internal.PRODUCTION.*.bloom_filter_space_used), | |
scale(sumSeries(metrics.cassandra.dsc1a.internal.PRODUCTION.*.key_cache_capacity),869), | |
sumSeries(metrics.cassandra.dsc1a.internal.OpsCenter.*.memtable_data_size), | |
sumSeries(metrics.cassandra.dsc1a.internal.OpsCenter.*.bloom_filter_space_used), |
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
{ | |
"handlers": { | |
"relay1": { | |
"type": "extension", | |
"command": "/etc/sensu/extensions/handlers/relay.rb" | |
"endpoints": { | |
"graphite": { | |
"host": "127.0.0.1", | |
"port": 60000 |
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/client.rb b/lib/sensu/client.rb | |
index 479c12b..49872f2 100644 | |
--- a/lib/sensu/client.rb | |
+++ b/lib/sensu/client.rb | |
@@ -233,12 +233,14 @@ module Sensu | |
socket.logger = @logger | |
socket.settings = @settings | |
socket.amq = @amq | |
+ socket.queue = @check_request_queue | |
diff --git a/lib/sensu/client.rb b/lib/sensu/client.rb |
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
cluster: | |
name: logstash-production | |
routing.allocation.awareness: | |
attributes: aws_availability_zone | |
force.aws_availability_zone.values: eu-west-1a,eu-west-1b | |
node: | |
name: somename | |
master: true | |
data: true |
NewerOlder