Skip to content

Instantly share code, notes, and snippets.

View robertely's full-sized avatar
💭
🍕

Robert Ely robertely

💭
🍕
View GitHub Profile
@robertely
robertely / collectd-logstash-consumer-example.conf
Last active December 17, 2015 15:39
Example Logstash config for consuming from collectd over amqp. Outputs to stdout.
input {
rabbitmq {
host => "rmq.xxx.xxx.com"
port => 5672
vhost => "metrics"
user => "xxxx"
password => "xxxx"
exchange => "collectd.logstash.plain"
queue => "<%= @node[:fqdn] %>"
exclusive => false
@robertely
robertely / logstash-collectd-graphite.conf
Created May 23, 2013 08:29
Collectd ->AMQP -> Graphite Proxy for logstash
input {
rabbitmq {
host => "rmq.xxx.xxx.com"
port => 5672
vhost => "metrics"
user => "xxxx"
password => "xxxx"
exchange => "collectd.logstash.plain"
queue => "<%= @node[:fqdn] %>"
exclusive => false
@robertely
robertely / logstash outputs
Last active December 17, 2015 15:39
logstash output examples.
output {
# stdout {
# debug => false
# debug_format => ruby
# }
# graphite {
# host => "localhost"
# metrics => [ "machines.%{datacenter}.%{hostname}.%{path}", "%{value}" ]
# port => 2003
# type => "collectdPlain"
.
./aggregation-cpu-average
./aggregation-cpu-average/cpu-idle.wsp
./aggregation-cpu-average/cpu-interrupt.wsp
./aggregation-cpu-average/cpu-nice.wsp
./aggregation-cpu-average/cpu-softirq.wsp
./aggregation-cpu-average/cpu-steal.wsp
./aggregation-cpu-average/cpu-system.wsp
./aggregation-cpu-average/cpu-user.wsp
./aggregation-cpu-average/cpu-wait.wsp
.
./aggregation-cpu-average
./aggregation-cpu-average/cpu-idle.wsp
./aggregation-cpu-average/cpu-interrupt.wsp
./aggregation-cpu-average/cpu-nice.wsp
./aggregation-cpu-average/cpu-softirq.wsp
./aggregation-cpu-average/cpu-steal.wsp
./aggregation-cpu-average/cpu-system.wsp
./aggregation-cpu-average/cpu-user.wsp
./aggregation-cpu-average/cpu-wait.wsp
@robertely
robertely / gist:5779287
Last active December 18, 2015 11:59
Logstash - > Graphite Local Proxy
input {
tcp{
port => 2003
type => "graphite"
mode => "server"
}
}
filter {
grok {
pattern => "%{DATA:name} %{NUMBER:value:float} %{POSINT:ts}"
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
cd
sudo apt-get update
sudo apt-get upgrade
Adafruit:
Qty. Products
2 Stepper Motor Mount with Hardware - NEMA-17 Sized
4 Aluminum GT2 Timing Pulley - 6mm Belt - 20 Tooth - 5mm Bore
4 Linear Rail Shaft Guide/Support - 8mm Diameter
4 Linear Ball Bearing - 8mm diameter
Mcmaster:
Qty Products
4 Hardened Precision Metric Steel Shaft, 8 mm Diameter, 400 mm Length
#!/usr/bin/python
from gi.repository import Gtk, Gdk
import ConfigParser
from subprocess import Popen
from glob import glob
from difflib import get_close_matches
from pprint import pprint
###
#
@robertely
robertely / audio.go
Last active August 29, 2015 14:05
Go app to print default sink and volume (int54)
package main
import (
"fmt"
"strings"
"os/exec"
"strconv"
)
const vmax = 65635