Skip to content

Instantly share code, notes, and snippets.

@drolfe
drolfe / elasticsearch_uniq_http_dst_by_src.json
Last active August 29, 2015 14:26
Elasticsearch uniq http dst by src
GET _search
{
"size": 0,
"aggs": {
"2": {
"terms": {
"field": "sflow_ipv4_src",
"size": 10,
"order": {
"1": "desc"
@drolfe
drolfe / Debian7
Last active August 29, 2015 14:20
sysctl tuning
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.core.rmem_max = 134217728
net.core.wmem_max = 134217728
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.core.netdev_max_backlog = 250000
net.ipv4.tcp_mtu_probing=1
@drolfe
drolfe / Debian_2drive_lvm
Last active August 29, 2015 14:20
PXE network disk partitioning
d-i partman-auto/disk string /dev/cciss/c0d0 /dev/cciss/c0d1
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select boot-root
d-i partman-auto/purge_lvm_from_device boolean true
@drolfe
drolfe / local.conf
Last active August 29, 2015 14:08 — forked from amotoki/local.conf
[[local|localrc]]
#-----------------------------
# Common congigurations
#-----------------------------
USE_NEUTRON=True
#NOVA_BRANCH=${NOVA_BRANCH:-milestone-proposed}
#SWIFT_BRANCH=${SWIFT_BRANCH:-milestone-proposed}
#GLANCE_BRANCH=${GLANCE_BRANCH:-milestone-proposed}
@drolfe
drolfe / ADD User Account to iLO.xml
Last active August 11, 2023 23:14
HP iLO XML Scripts
HPONCFG all << end_marker
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="Dontcare" PASSWORD="UsingAutologin">
<USER_INFO MODE="write">
<ADD_USER
USER_NAME="daniel"
USER_LOGIN="daniel"
PASSWORD="daniel123">
<ADMIN_PRIV value ="Yes"/>
<REMOTE_CONS_PRIV value ="Yes"/>
@drolfe
drolfe / README.md
Last active June 9, 2021 22:44
Dashing Snmp Interface Stats

Description

Simple Dashing job (and associated dash html) to display SNMP interface percentages

##Dependencies

snmp

Add it to dashing's gemfile:

@drolfe
drolfe / snmp.rb
Last active April 2, 2021 20:36
Ruby Snmp Interface Bandwidth
#!/usr/bin/ruby
require 'rubygems'
require 'snmp'
include SNMP
@results = Array.new
# Interface speed in mbps
interface_speed = 10000
def get_snmp
@drolfe
drolfe / deb-firstboot-script.sh
Last active December 19, 2017 03:47
FirstBoot Script
#!/bin/bash
#Values set by foreman finish scritp..
H_NAME=
OS_NAME=
OS_MAJOR=
OS_MINOR=
IPV4=
NMASK=
GWAY=