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
Application environment of node sensu1@sensu1 ... | |
[{auth_backends,[rabbit_auth_backend_internal]}, | |
{auth_mechanisms,['PLAIN','AMQPLAIN']}, | |
{backing_queue_module,rabbit_variable_queue}, | |
{cluster_nodes,[]}, | |
{collect_statistics,fine}, | |
{collect_statistics_interval,5000}, | |
{default_permissions,[<<".*">>,<<".*">>,<<".*">>]}, | |
{default_user,<<"guest">>}, | |
{default_user_tags,[administrator]}, |
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
Meta data: | |
aggregation method: average | |
max retention: 63072000 | |
xFilesFactor: 0.5 | |
Archive 0 info: | |
offset: 52 | |
seconds per point: 10 | |
points: 2160 | |
retention: 21600 |
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
require 'reel' | |
connections = [] | |
server = Reel::Server.supervise '0.0.0.0', 3012 do |connection| | |
if request = connection.request | |
connections << connection | |
connection.respond :ok, transfer_encoding: :chunked | |
end | |
end |
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
require 'octarine' | |
require 'reel' | |
module Reel | |
module App | |
def self.included(base) | |
base.class_eval do | |
include Octarine::App | |
attr_accessor :server |
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
/us/apps/rails_app/shared/bundle/ruby/1.9.1/gems/ffi-rzmq-0.9.3/lib/ffi-rzmq/socket.rb:189: [BUG] Segmentation fault | |
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux] | |
-- Control frame information ----------------------------------------------- | |
c:0075 p:---- s:0265 b:0265 l:000264 d:000264 CFUNC :zmq_connect | |
c:0074 p:0022 s:0260 b:0260 l:000259 d:000259 METHOD /us/apps/rails_app/shared/bundle/ruby/1.9.1/gems/ffi-rzmq-0.9.3/lib/ffi-rzmq/socket.rb:189 | |
c:0073 p:0015 s:0255 b:0254 l:000245 d:000253 BLOCK /us/apps/rails_app/shared/bundle/ruby/1.9.1/gems/tracer5-0.1.2/lib/tracer5/subscriber/zmq_output.rb:16 | |
c:0072 p:---- s:0251 b:0251 l:000250 d:000250 FINISH | |
c:0071 p:---- s:0249 b:0249 l:000248 d:000248 CFUNC :each | |
c:0070 p:0149 s:0246 b:0246 l:000245 d:000245 METHOD /us/apps/rails_app/shared/bundle/ruby/1.9.1/gems/tracer5-0.1.2/lib/tracer5/subscriber/zmq_output.rb:15 |
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
# installs a standalone sensu check | |
# sensu_standalone_check "unicorn_master" do | |
# command "#{node.sensu.directory}/plugins/processes/check-procs.rb" | |
# arguments "-f #{deploy_to}/shared/pids/unicorn.pid" | |
# end | |
define :sensu_standalone_check, :interval => 60, :enable => true, :owner => "root", :mode => 0644 do | |
include_recipe "sensu::_config" |
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
# Step 1: gem install thor | |
# Step 2: thor ssl:generate_ca && thor ssl:generate_cert | |
require 'thor' | |
require 'securerandom' | |
class SSL < Thor | |
desc "generate_ca", "Generate a Root CA" | |
method_option :name, type: :string, desc: "Common name" |
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
require 'cabin' | |
require 'ffi-rzmq' | |
class Cabin::Outputs::ZeroMQ | |
DEFAULTS = { | |
:topology => "pushpull", | |
:hwm => 0, # default: no limit | |
:linger => -1 # default: wait until all messages are sent | |
} |
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
module Zensu | |
module RPC | |
class Requester | |
include Celluloid::ZMQ | |
include RPC::Encoding | |
def initialize | |
@socket = Celluloid::ZMQ::ReqSocket.new | |
begin |
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
require 'rubygems' | |
require 'saxaphone' | |
require 'stringio' | |
class Location < Saxaphone::Element | |
has_element 'categories', 'Categories' do |element| | |
puts "categories element #{element.categories.inspect}" | |
attributes['categories'] = element.categories | |
end | |
end |