Skip to content

Instantly share code, notes, and snippets.

View sentinelleader's full-sized avatar

Deepak Mohandas sentinelleader

View GitHub Profile
#! /usr/bin/ruby
require 'net/ssh'
user_name = ARGV[0]
if user_name == NIL
abort("No username mentioned. command should run like ---> account_call_details.rb {plivo username}")
else
cmd_format_userid = %q(psql -U postgres plivo_cloud -F, --no-align -c "select id from auth_user where username=')
cmd_userid = cmd_format_userid + user_name + %q(';" | grep -v id | grep -v row)
/*
*
* To enable this backend, include './backends/riemann' in the backends
* configuration array:
*
* Requires Riemann Node client
*
* backends: ['./backends/riemann']
*
*/
# First do a fresh install of CentOS 5.7 i386, server configuration (no GUI)
# This should be performed as root since it's going to be installing a bunch of stuff
# --- Update things to make sure we have the latest patches ---
# Add EPEL so we can get reasonably recent packages
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# --- Install all the packages --- #
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached
#! /bin/bash
#
# This script needs "fpm". If you dont have it,
# run "gem install fpm"
#
# You also need to "apt-get install python-setuptools" (otherwise fpm fails)
clean() {
rm -rf whisper-0.9.9 carbon-0.9.9 graphite-web-0.9.9
@sentinelleader
sentinelleader / munin-graphite.rb
Created September 11, 2012 17:08
munin-graphite
#!/usr/bin/env ruby
#
# graphite-mdash client - build ontop of munin-graphite
#
# Copyright: Copyright (c) 2012, Jonas Genannt <jonas@brachium-system.net>
#
# Author:: Adam Jacob (<adam@hjksolutions.com>)
# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
# License:: GNU General Public License version 2 or later
#