Skip to content

Instantly share code, notes, and snippets.

Splunk Recipes for Heroku

A collection of Splunk recipes for Heroku logs. Instructions for setting up Splunk Storm with Heroku can be found here. For the vast majority of these recipes you'll need to have enabled the Heroku labs feature, log-runtime-metrics, for your application.

@mbursi
mbursi / pinger.sh
Created February 27, 2014 11:59
Ping subnet
#!/bin/sh
: ${1?"Usage: $0 ip subnet to scan. eg '192.168.1.'"}
subnet=$1
for addr in `seq 0 1 255 `; do
# ( echo $subnet$addr)
( ping -c 3 -t 5 $subnet$addr > /dev/null && echo $subnet$addr is Alive ) &
done
@mbursi
mbursi / generate_random_files.sh
Created February 26, 2014 14:08
Generate random files with random content
no_of_files=10;
counter=1;
while [[ $counter -le $no_of_files ]];
do echo Creating file no $counter;
dd bs=1024 count=$RANDOM skip=$RANDOM if=/dev/urandom of=random-file.$counter;
let "counter += 1";
done
# Copy:
# /etc/init/delayed_job.conf
# Execute:
# ln -s /lib/init/upstart-job /etc/init.d/delayed_job
# Change user name
description "Start up the delayed_job service"
start on runlevel [2345]
stop on runlevel [06]
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
#!/bin/bash
# CentOS rbenv system wide installation script
# Forked from https://gist.github.com/jpfuentes2/2002954
# Installs rbenv system wide on CentOS 5/6, also allows single user installs.
# Install pre-requirements
yum groupinstall -y "Development Tools"
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \