Skip to content

Instantly share code, notes, and snippets.

View stonith's full-sized avatar

Darren Foo stonith

  • Shopify
  • Vancouver
View GitHub Profile
@jedi4ever
jedi4ever / gist:1216529
Created September 14, 2011 13:20
Quick gist on getting vsphere and vcenter and fog/vsphere going
Quick gist on getting vsphere and vcenter and fog/vsphere going
# Things to download
- Download free evaluation version of window 2008
- Download free evaluation of esxi v5
- Download free evaluation of esxi vsphere (control center) iso
# Install esxi in vmware fusion
1)Install esxi in vmware (select vmware/esx as host)
create a user root/pipopopo
@jordansissel
jordansissel / data.md
Created June 22, 2012 03:28
Logstash 1.1.1 + ElasticSearch 0.19.5 compression tests

compression tests of logstash+elasticsearch

  • logstash 1.1.1-pre (unreleased)
  • elasticsearch 0.19.5-SNAPSHOT (unreleased)
wget https://dl.dropbox.com/u/2136051/elasticsearch-0.19.5-SNAPSHOT.zip
unzip elasticsearch-0.19.5-SNAPSHOT.zip
@CrackerJackMack
CrackerJackMack / purge-cloudstack.sh
Created June 22, 2012 12:14
PEW PEW reset cloudstack as a fresh install
/etc/init.d/cloud-management stop
mysql -ppassword -e 'drop database cloud'
mysql -ppassword -e 'drop database cloud_usage'
cloud-setup-databases cloud:password@localhost --deploy-as=root:password
rm -rf /var/log/cloud/management/*
cloud-setup-management
/etc/init.d/cloud-management start
@jordansissel
jordansissel / RESULTS.md
Created September 21, 2012 07:41
screenshot + code showing how to query logstash/elasticsearch with a graphite function.

logstash queries graphed with graphite.

Operation: Decouple whisper from graphite.

Method: Create a graphite function that does a date histogram facet query against elasticsearch for a given query string for the time period viewed in the current graph.

Reason: graphite has some awesome math functions. Wouldn't it be cool if we could use those on logstash results?

The screenshot below is using logstash to watch the twitter stream of keywords "iphone" "apple" and "samsung" - then I graph them each, so we get an idea of popularity. As a bonus, I also do a movingAverage() on the iphone curve to show you why this is awesome.

@rashidkpc
rashidkpc / gist:3794465
Created September 27, 2012 14:55
Kibana on Passenger
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11
PassengerRuby /usr/bin/ruby
<VirtualHost *:80>
ServerName logs.example.com
ServerAlias logs.example.com
DocumentRoot /home/httpd/Kibana/static
@jordansissel
jordansissel / gist:3840775
Created October 5, 2012 16:14
logstash index template for elasticsearch
curl -XPUT http://localhost:9200/_template/logstash-template -d '
{
"template": "logstash-*",
"settings": {
"index.cache.field.type": "soft",
"index.compress.stored": true,
"index.merge.policy.max_merged_segment": "5g",
"index.query.default_field": "@message",
"index.refresh_interval": "5s",
"index.store.compress.stored": true,
@louiszuckerman
louiszuckerman / gist:4658921
Last active December 11, 2015 20:59
kibana on passenger in a subdirectory of an existing apache virtual host
# These instructions are derived from the Passenger documentation,
# http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rack_to_sub_uri
# And tested with kibana git master on 1/28/13
# First, create a symlink from the existing virtualhost's
# document root to your kibana installation's public/static
# directory. for example,
# ln -s /path/to/kibana/public /var/www/kibana
# kibana 0.2.0 and earlier will have a /static directory
# instead of /public
@benwtr
benwtr / nagios.coffee
Last active January 13, 2016 08:29 — forked from oremj/nagios.coffee
# Description:
# This script receives pages in the formats
# /usr/bin/curl -d host="$HOSTALIAS$" -d output="$SERVICEOUTPUT$" -d description="$SERVICEDESC$" -d type=service -d notificationtype="$NOTIFICATIONTYPE$ -d state="$SERVICESTATE$" $CONTACTADDRESS1$
# /usr/bin/curl -d host="$HOSTNAME$" -d output="$HOSTOUTPUT$" -d type=host -d notificationtype="$NOTIFICATIONTYPE$" -d state="$HOSTSTATE$" $CONTACTADDRESS1$
#
# Based on a gist by oremj (https://gist.github.com/oremj/3702073)
#
# Configuration:
# HUBOT_NAGIOS_URL - https://<user>:<password>@nagios.example.com/cgi-bin/nagios3
#
define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension json>
Module xm_json
@endzyme
endzyme / f5_lb_soap_savon.md
Created June 11, 2013 01:01
F5 Load Balancer SOAP API Interactions with Savon

SOAP Calls

Get Heartbeat String

Connection

soap = 
  Savon.client do |s|
    s.wsdl "https://#{ipaddress}/iControl/iControlPortal.cgi?WSDL=LocalLB.Monitor"
    s.basic_auth [user, password]
    s.ssl_verify_mode :none
    s.endpoint "https://#{ipaddress}/iControl/iControlPortal.cgi"