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 -v -H "X-Auth-Token: my_token" https://rackspace_api.url/current | python -m json.tool | |
* Adding handle: conn: 0xe08fb0 | |
* Adding handle: send: 0 | |
* Adding handle: recv: 0 | |
* Curl_addHandleToPipeline: length: 1 | |
* - Conn 0 (0xe08fb0) send_pipe: 1, recv_pipe: 0 | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to rackspace_api.url port 443 (#0) | |
* Trying 174.143.139.141... |
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
newrelic.conf script | |
# The current user of the plugin (and subfolders) is root, so I've written this upstart script: | |
# | |
# Rackspace NewRelic plugin | |
# This script keeps this service running. | |
start on runlevel [2345] | |
stop on runlevel [016] |
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
Starting logstash in debug mode, I can see messages are correctly tagged and replaced but the count and rates are still in 0. | |
processing {:metric=>"metrics.http.%{tags}.%{response}.count", :value=>"metrics.http.%{tags}.%{response}.count", :level=>:debug, :file=>"/path/logstash/logstash-1.3.3-flatjar.jar!/logstash/outputs/graphite.rb", :line=>"115"} | |
processing {:metric=>"metrics.http.%{tags}.%{response}.rate_1m", :value=>"metrics.http.%{tags}.%{response}.rate_1m", :level=>:debug, :file=>"/path/logstash/logstash-1.3.3-flatjar.jar!/logstash/outputs/graphite.rb", :line=>"115"} | |
processing {:metric=>"metrics.http.%{tags}.%{response}.rate_5m", :value=>"metrics.http.%{tags}.%{response}.rate_5m", :level=>:debug, :file=>"/path/logstash/logstash-1.3.3-flatjar.jar!/logstash/outputs/graphite.rb", :line=>"115"} | |
processing {:metric=>"metrics.http.%{tags}.%{response}.rate_15m", :value=>"metrics.http.%{tags}.%{response}.rate_15m", :level=>:debug, :file=>"/path/logstash/logstash-1.3.3-flatjar.jar!/logstash/outputs/graphite.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
#!/usr/bin/env ruby | |
require 'newrelic_plugin' | |
require 'getoptlong' | |
unless $:.include?(File.dirname(__FILE__) + '/../lib/') | |
$: << File.dirname(__FILE__) + '/../lib' | |
end | |
def usage |
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
cat /etc/sensu/handlers/sensu-handler-input-example.json | /etc/sensu/handlers/twitter.rb | |
/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/twitter-5.6.0/lib/twitter/rest/response/raise_error.rb:21:in `on_complete': You cannot send messages to users who are not following you. (Twitter::Error::Forbidden) | |
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:9:in `block in call' | |
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:57:in `on_complete' | |
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:8:in `call' | |
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/request/url_encoded.rb:15:in `call' | |
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/request/multipart.rb:14:in `call' | |
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/twitter-5.6.0/lib/twitter/rest/request/multipart_with_file.rb:18:in `call' | |
fro |
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
begin | |
rescue | |
foo.create_direct_message("@my_twitter_account", "There's been an error") | |
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
#!/usr/bin/env /opt/sensu/embedded/bin/ruby | |
# | |
# Sensu Twitter Handler | |
# === | |
# | |
require 'rubygems' if RUBY_VERSION < '1.9.0' | |
require 'sensu-handler' | |
require 'twitter' | |
require 'timeout' |
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
Error: /Stage[main]/Security::Certificates::Sensu/File[/etc/sensu/ssl/client_cert.pem]: Could not evaluate: Could not retrieve information from environment rackspace source(s) puppet:///modules/security/etc/sensu/ssl/client_cert.pem |
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
/var/log/varnish/*.log { | |
missingok | |
notifempty | |
sharedscripts | |
delaycompress | |
size 512M | |
postrotate | |
/bin/kill -HUP `cat /var/run/varnishlog.pid 2>/dev/null` 2> /dev/null || true | |
/bin/kill -HUP `cat /var/run/varnishncsa.pid 2>/dev/null` 2> /dev/null || true | |
endscript |
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
{ | |
"network": { | |
"servers": [ | |
"logstash-in_server:10103" | |
], | |
"ssl ca": "/path", | |
"timeout": 15 | |
}, | |
"files": [ | |
{ |