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
yum install -y ruby rubygems make gcc gcc-c++ ruby-devel | |
gem install riemann-tools | |
nohup riemann-health --host 192.168.10.100& |
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
apt-get -y install ruby rubygems make gcc g++ ruby-dev | |
gem install riemann-tools | |
nohup /var/lib/gems/1.8/bin/riemann-health --host 192.168.10.100& | |
exit |
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 'riemann/client' | |
c = Riemann::Client.new host: 'euca-riemann', port: 5555 | |
#find out my hostname | |
host = %x[hostname] | |
#first determine how many instances I have according to libvirt | |
kvm_instances = %x[virsh list |grep i-|wc -l] |
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 File.expand_path('../../lib/riemann/tools', __FILE__) | |
class Riemann::Tools::KVM | |
include Riemann::Tools | |
def tick | |
#determine how many instances I have according to libvirt | |
kvm_instances = %x[virsh list |grep i-|wc -l] |
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
#!/usr/bin/env ruby | |
require File.expand_path('../../lib/riemann/tools', __FILE__) | |
class Riemann::Tools::KVM | |
include Riemann::Tools | |
def tick | |
#determine how many instances I have according to libvirt |
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
#define the suffix we'll use in pig latin | |
pyg = 'ay' | |
#ask for input of the word to translate | |
original = raw_input('Enter a word:') | |
#santize input and check to see if word starts with a vowel or consonant | |
if len(original) > 0 and original.isalpha(): | |
original = original.lower() | |
print "you entered: " + original |
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
May 27, 2014 2:07:13 PM jenkins.plugins.hipchat.StandardHipChatService publish | |
WARNING: Error posting to HipChat | |
java.net.UnknownHostException: https | |
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) | |
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) | |
at java.net.Socket.connect(Socket.java:579) | |
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618) | |
at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:407) | |
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88) | |
at hudson.util.NoClientBindSSLProtocolSocketFactory.createSocket(NoClientBindSSLProtocolSocketFactory.java:135) |
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
[''] | |
index: 0 | |
pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt, | |
['pxname', 'svname', 'qcur', 'qmax', 'scur', 'smax', 'slim', 'stot', 'bin', 'bout', 'dreq', 'dresp', 'ereq', 'econ', 'eresp', 'wretr', 'wredis', 'status', 'weight', 'act', 'bck', 'chkfail', 'chkdown', 'lastchg', 'downtime', 'qlimit', 'pid', 'iid', 'sid', 'throttle', 'lbtot', 'tracked', 'type', 'rate', 'rate_lim', 'rate_max', 'check_status', 'check_code', 'check_duration', 'hrsp_1xx', 'hrsp_2xx', 'hrsp_3xx', 'hrsp_4xx', 'hrsp_5xx', 'hrsp_other', 'hanafail', 'req_rate', 'req_rate_max', 'req_tot', 'cli_abrt', 'srv_abrt', ''] | |
pxname | |
index: 0 | |
svname | |
index: 1 | |
qcur |
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
# Borrowed from http://www.commandlinefu.com/commands/view/4183/generate-random-password | |
function randpass() { | |
cat /dev/urandom | env LC_CTYPE=C tr -dc a-zA-Z0-9 | head -c 16; echo | |
} |
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
$ knife actor map; knife group show admin | |
Found 1 users and 1 clients | |
wrote map to 'actor-map.yaml' | |
ERROR: The object you are looking for could not be found | |
Response: Cannot load group admin | |
$ cat actor-map.yaml | |
--- | |
:user_map: | |
:users: |
OlderNewer