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 'eventmachine' | |
require 'em-synchrony' | |
require 'thin' | |
#require 'thin/version' | |
#module Thin | |
# def self.win? # Are we runing windows | |
# 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
I'm having trouble iterating over an array, that's been retrieved from a hash. Here's the hash definition in the node manifest: | |
$alias_ips = { | |
24 => [ | |
'10.254.16.82/24', | |
], | |
} | |
This hash is passed as a parameter to a named type, which in turn processes an erb template | |
as part of a File definition. The erb file contains: |
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
INFO executive: 2013-07-05 11:56:04 +0930 | client1-localhost-test-1:HTTP Port 443 | acknowledgement | NO CONTACTS | |
INFO executive: 2013-07-05 11:56:17 +0930 | client1-localhost-test-1:HTTP Port 443 | acknowledgement | NO CONTACTS | |
2013-07-10T15:27:24+09:30 [INFO] :: notify :: client1-localhost-test-1:HOST | problem | NO CONTACTS | |
2013-07-10T15:27:54+09:30 [INFO] :: notify :: client1-localhost-test-1:HOST | recovery | NO CONTACTS |
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
{"heart-of-gold.local":{"curl_json-flapjack":{"derive-all_time-action":{"value":{"start":1374736284,"finish":1374740750,"data":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,n |
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
group :test do | |
... | |
gem 'perftools.rb' | |
end |
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
(again run for about 70 seconds and killed) | |
jesse@Heart-of-Gold flapjack $ CPUPROFILE=/tmp/flapjack_profile_3 RUBYOPT="-r`gem which perftools | tail -1`" bin/flapjack start --no-daemonize | |
Flapjack starting...Starting flapjack service... | |
2013-07-26T10:24:51+09:30 [INFO] :: flapjack-jabber :: starting | |
2013-07-26T10:24:51+09:30 [INFO] :: flapjack-web :: starting web - class | |
2013-07-26T10:24:51+09:30 [INFO] :: flapjack-api :: starting api - class | |
2013-07-26T10:24:52+09:30 [INFO] :: flapjack-jabber :: Jabber Connected | |
2013-07-26T10:24:52+09:30 [INFO] :: flapjack-jabber :: Joining room [email protected] | |
2013-07-26T10:24:52+09:30 [INFO] :: flapjack-jabber :: Joining room [email protected] |
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
jesse@Heart-of-Gold flapjack $ pprof.rb --text /tmp/flapjack_profile | |
Using local file /Users/jesse/.rbenv/versions/1.9.3-p125/bin/ruby. | |
Using local file /tmp/flapjack_profile. | |
Use of uninitialized value $address in exists at /Users/jesse/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/perftools.rb-2.0.1/bin/pprof line 2781. | |
Total: 69688350 samples | |
8671483 12.4% 12.4% 8671489 12.4% Redis::Connection::CommandHelper#build_command | |
3515666 5.0% 17.5% 4017939 5.8% EventMachine::Deferrable#set_deferred_status | |
3515596 5.0% 22.5% 6528947 9.4% EventMachine::Deferrable#callback | |
2511410 3.6% 26.1% 2511410 3.6% EventMachine::Connection#send_data | |
2511115 3.6% 29.7% 29765172 42.7% Redis::Client#ensure_connected |
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
jesse@Heart-of-Gold flapjack $ time CPUPROFILE=/tmp/flapjack_profile_4 RUBYOPT="-r`gem which perftools | tail -1`" bin/flapjack start --no-daemonize | |
Flapjack starting...Starting flapjack service... | |
2013-07-26T12:40:05+09:30 [INFO] :: flapjack-jabber :: starting | |
2013-07-26T12:40:05+09:30 [INFO] :: flapjack-web :: starting web - class | |
2013-07-26T12:40:05+09:30 [INFO] :: flapjack-api :: starting api - class | |
2013-07-26T12:40:08+09:30 [INFO] :: flapjack-jabber :: Jabber Connected | |
2013-07-26T12:40:08+09:30 [INFO] :: flapjack-jabber :: Joining room [email protected] | |
2013-07-26T12:40:08+09:30 [INFO] :: flapjack-jabber :: Joining room [email protected] | |
^C2013-07-26T12:43:53+09:30 [INFO] :: flapjack-coordinator :: processor: stopping -> stopped | |
2013-07-26T12:43:53+09:30 [INFO] :: flapjack-coordinator :: notifier: stopping -> stopped |
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
{ | |
"events_created":24010, | |
"flapjack_runtime":127.21185874939, | |
"processing_rate":188.740265538453, | |
"ok_to_critical":4108, | |
"critical_to_ok":4101, | |
"checks_per_entity":5, | |
"entities":2, | |
"interval":3600, | |
"hours":2400.0, |
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
@last_error = { | |
:code => response.code, | |
:body => response.body | |
} | |
# vs | |
@last_error = {:code => response.code, | |
:body => response.body} |