Skip to content

Instantly share code, notes, and snippets.

View ripienaar's full-sized avatar

R.I.Pienaar ripienaar

View GitHub Profile
title "CPU IRQ Usage"
vtitle "percent"
area :stacked
service :munin, :cpu do
field :irq, :derivative => true,
:scale => 0.001,
:color => "red",
:alias => "IRQ"
#!/bin/env ruby
# Small utility to run a command disassociated from the
# current process.
#
# You can optionally redirect STDERR or STDOUt to a file,
# change the directory where the command gets run and sleep
# a set or random amount of time before running the command
#
# R.I.Pienaar <[email protected]>
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: monitor1.xx.net
Creation date: Sep 19, 2010
Entry type: PrivateKeyEntry
Certificate chain length: 2
require 'rubygems'
require 'stomp'
def read_key(type, key=nil, passphrase=nil)
return key if key.nil?
raise "Could not find key #{key}" unless File.exist?(key)
if type == :public
key = OpenSSL::PKey::RSA.new(File.read(key))
looking for a strong Systems Admininstrator with experience in the following fields. 
Managing of Linux based server infrastructure
Managing of Windows based server infrastructure and internal IT admin
Familiar with Monitoring tools
Familiar with deployment automation
Networking and security (Firewalls, Load
Level 1 - 3 support of front-end web implementation and back-end systems
Experience consolidating platform
Preferable some development experience
<%=
# http://en.wikipedia.org/wiki/Culture_ship_names
require 'md5'
shipnames = Array.new
#
# Culture
shipnames << "Lacking That Small Match Temperament"
[{"statusmsg":"OK","data":{"pslist":[{"exit_signal":17,"vsize":144289792,"endcode":4196820,"signal":0,"euid":0,"rss":10167,"processor":0,"cwd":"/tmp","state":"R","cutime":23,"startcode":4194304,"rlim":18446744073709551615,"exe":"/usr/bin/ruby","tpgid":-1,"utime":1558,"uid":0,"egid":0,"comm":"ruby","starttime":635984460,"startstack":140735935225072,"ppid":1,"cstime":22,"tty_nr":0,"root":"/","pgrp":13482,"kstkesp":140735935082704,"wchan":18446744073709551615,"gid":0,"cmdline":"ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid --config=/etc/mcollective/server.cfg","pid":13484,"minflt":52068,"fd":{"0":"/dev/null","1":"/dev/null","2":"/dev/null","3":null,"4":"/etc/mcollective/policies/default.policy","5":"/var/log/mcollective.log","6":"socket:[32452195]","7":"/proc"},"session":13482,"cminflt":53366,"itrealvalue":0,"sigignore":16777216,"kstkeip":254731454925,"nswap":0,"sigcatch":33586759,"name":"ruby","username":"root","environ":{"PWD":"/","LANG":"en_GB","_":"/usr/sbin/mcollectived","TERM":"dumb","PATH":"
#!/usr/bin/ruby
require 'socket'
require 'openssl'
require 'pp'
host = ARGV.shift
port = ARGV.shift
tcp_socket = TCPSocket.open host, port
$ mkdir temp
$ cd temp
$ curl -O http://downloads.puppetlabs.com/mcollective/mcollective-1.3.3.tgz
$ tar -xvzf mcollective-1.3.3.tgz
$ cd mcollective-1.3.3
$ cp etc/client.cfg.dist ~/.mcollective
# edit ~/.mcollective set libdir to /Users/rip/temp/mcollective-1.3.3/plugins and a few other bits like set plugin.yaml to /Users/rip/temp/mcollective-1.3.3/etc/facts.yaml.dist for a client its irrelevant just needs to be there
$ PATH=$PATH:/Users/rip/temp/mcollective-1.3.3/bin
$ export RUBYLIB=/Users/rip/temp/mcollective-1.3.3/lib
$ mco ping
2012-06-21 10:31 (PDT): fubada: have u guys seen http://www.devco.net/archives/2010/09/22/experience_with_glusterfs.php
2012-06-21 10:31 (PDT): glusterbot: <http://goo.gl/uQODN> (at www.devco.net)
2012-06-21 10:31 (PDT): fubada: how relevant is that today
2012-06-21 10:31 (PDT): fubada: his concerns/issues
2012-06-21 10:32 (PDT): semiosis: fubada: not relevant
2012-06-21 10:32 (PDT): JoeJulian: Probably not at all. An incredible amount has changed over 2 years.
2012-06-21 10:32 (PDT): semiosis: fubada: and that guy is a hater anyway, I have a hard time taking his opinions seriously
2012-06-21 10:32 (PDT): fubada: lol
2012-06-21 10:33 (PDT): semiosis: you know what they say... haters gonna hate