Skip to content

Instantly share code, notes, and snippets.

name "production"
description "The production environment"
cookbooks_versions(
"apt" => "1.4.2",
"mongodb" => "0.11.0",
"java" => "1.5.0",
"tomcat" => "0.10.4",
"sudo" => "1.1.0",
"hosts" => "0.0.1",
"users" => "0.0.1"
@zadunn
zadunn / logstash
Created July 31, 2012 14:50 — forked from calston/logstash
Logstash init script
#! /bin/sh
### BEGIN INIT INFO
# Provides: logstash
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
@zadunn
zadunn / logstash RPM spec
Created August 2, 2012 19:59 — forked from slojo404/logstash RPM spec
logstash monolithic init script and spec file for CentOS / RedHat
Name: logstash
Version: 1.1.0
Release: 1%{?dist}
Summary: logstash is a tool for managing events and logs
Group: System/Logging
License: ASL 2.0
URL: http://logstash.net/
Source0: http://semicomplete.com/files/logstash/logstash-%{version}-monolithic.jar
Source1: logstash
{"message":"thread watchdog timeout","thread":"#<Thread:0x4aca8a00>","backtrace":["file:/opt/logstash/logstash-monolithic.jar!/logstash/filterworker.rb:32:in `backtrace'","file:/opt/logstash/logstash-monolithic.jar!/logstash/filterworker.rb:32:in `run'","file:/opt/logstash/logstash-monolithic.jar!/logstash/agent.rb:708:in `each'","file:/opt/logstash/logstash-monolithic.jar!/logstash/agent.rb:708:in `run_filter'","file:/opt/logstash/logstash-monolithic.jar!/logstash/agent.rb:435:in `run_with_config'"],"thread_watchdog":"2012-10-10 12:01:21 -0400","cutoff":2,"state":{"event":{"@source":"tcp://0.0.0.0:10514/client/10.20.64.245:33766","@type":"syslog-tcp","@tags":[],"@fields":{"timestamp":["Oct 10 12:01:19"],"logsource":["fspr001"],"program":["kernel"],"message":["sd 2:0:0:4: [sdp] Sense Key : Illegal Request [current] "]},"@timestamp":"2012-10-10T16:01:19.000Z","@source_host":"0.0.0.0","@source_path":"/client/10.20.64.245:33766","@message":"<6>Oct 10 12:01:19 fspr001 kernel: sd 2:0:0:4: [sdp] Sense Key : Illegal
15/10/2012 17:21:30 :: Sorted 3 cache queues in 0.000067 seconds
15/10/2012 17:21:36 :: Sorted 102 cache queues in 0.000098 seconds
15/10/2012 17:21:43 :: Sorted 330 cache queues in 0.000219 seconds
15/10/2012 17:21:47 :: Sorted 7 cache queues in 0.000040 seconds
15/10/2012 17:21:49 :: Sorted 96 cache queues in 0.000070 seconds
15/10/2012 17:21:51 :: /opt/graphite/conf/storage-aggregation.conf not found, ignoring.
15/10/2012 17:21:51 :: Sorted 13 cache queues in 0.000056 seconds
15/10/2012 17:21:56 :: Sorted 9 cache queues in 0.000035 seconds
15/10/2012 17:22:03 :: Sorted 27 cache queues in 0.000041 seconds
15/10/2012 17:22:11 :: Sorted 48 cache queues in 0.000066 seconds
Exception `RuntimeError' at file:/opt/logstash/logstash-monolithic.jar!/logstash/agent.rb:422 - fail
RuntimeError: fail
run_with_config at file:/opt/logstash/logstash-monolithic.jar!/logstash/agent.rb:422
each at org/jruby/RubyArray.java:1615
run_with_config at file:/opt/logstash/logstash-monolithic.jar!/logstash/agent.rb:420
run_with_config at file:/opt/logstash/logstash-monolithic.jar!/logstash/agent.rb:369
run at file:/opt/logstash/logstash-monolithic.jar!/logstash/agent.rb:318
#!/usr/bin/env node
os = require('os');
var results = {};
results.total_mem = { _type: "L"};
results.free_mem = { _type: "L" };
results.total_mem._value = os.totalmem();
results.free_mem._value = os.freemem();
#!/usr/bin/env ruby
require 'rubygems' if RUBY_VERSION < '1.9.0'
require 'sensu-handler'
require 'json'
require 'timeout'
class OpenTSDB < Sensu::Handler
# override filters from Sensu::Handler. not appropriate for metric handlers
def filter; end
{:message=>"Too many active ES requests, blocking now.", :inflight_requests=>50, :max_inflight_requests=>50, :level=>:info, :file=>"/opt/logstash/logstash-monolithic.jar!/logstash/outputs/elasticsearch.rb", :line=>"160", :method=>"receive"}
{
"handlers": {
"opentsdb": {
"type": "pipe",
"command": "/etc/sensu/handlers/opentsdb.rb"
}
},
"opentsdb" : {
"server" : "localhost",
"port" : 4242,