Skip to content

Instantly share code, notes, and snippets.

View viglesiasce's full-sized avatar

Vic Iglesias viglesiasce

View GitHub Profile
@viglesiasce
viglesiasce / logstash.conf
Last active September 22, 2015 21:59 — forked from anonymous/logstash.conf
Eucalyptus Logstash Filter
input {
tcp { port => 3333 }
}
filter {
grok {
match => { "message" => ["%{TIMESTAMP_ISO8601:euca_timestamp}%{SPACE}%{LOGLEVEL:euca_log_level}%{SPACE}\|%{GREEDYDATA:euca_message}",
"%{TIMESTAMP_ISO8601:euca_timestamp}%{SPACE}%{LOGLEVEL:euca_log_level}%{SPACE}%{BASE10NUM:euca_pid}%{SPACE}%{WORD:euca_function}%{SPACE}\|%{GREEDYDATA:euca_message}",
"%{TIMESTAMP_ISO8601:euca_timestamp}%{SPACE}%{LOGLEVEL:euca_log_level}%{SPACE}%{GREEDYDATA:euca_message}"] }
}
date {
#!/bin/bash -xe
#
# configure vlan for SANs
#
IP=`ifconfig em1 | grep "inet " | awk '{ print $2 }' | awk '{sub("addr:","")}1'`
Octet3=`echo $IP | cut -d"." -f3`
Octet4=`echo $IP | cut -d"." -f4`
NewOctet3=$((Octet3))
@viglesiasce
viglesiasce / scale-post.sh
Last active August 29, 2015 14:18
scale-post-script
#!/bin/bash -xe
source /root/eucarc
euca-modify-property -p objectstorage.max_buckets_per_account=1000000000
if euca-describe-images -a | grep -v trusty; then
euca-install-image -b trusty --virt hvm -i /root/images/trusty-server-cloudimg-amd64-disk1.raw -r x86_64 -n trusty
fi
for image in `euca-describe-images | grep IMAGE | awk '{print $2}'`; do
euca-modify-image-attribute -a all -l $image
done
@viglesiasce
viglesiasce / mnv-4.2.yml
Created February 26, 2015 22:14
managed-no-vlan 4.2
---
chef_type: "environment"
cookbook_versions: {}
default_attributes:
eucalyptus:
default-img-url: "http://images.walrus.cloud.qa1.eucalyptus-systems.com:8773/precise-server-cloudimg-amd64-disk1.img"
enterprise-repo: "http://packages.release.eucalyptus-systems.com/yum/tags/enterprise-4.1/centos/6/x86_64/"
euca2ools-repo: "http://packages.release.eucalyptus-systems.com/yum/tags/euca2ools-3.2/centos/6/x86_64/"
eucalyptus-repo: "http://packages.release.eucalyptus-systems.com/yum/tags/eucalyptus-4.1/centos/6/x86_64/"
init-script-url: "http://git.qa1.eucalyptus-systems.com/qa-repos/eucalele/raw/master/scripts/network-interfaces.sh"
_ ;-.-._ /----------------------------------------------\
.-" "-. \. _{ ( Welcome to HuevOS )
/ \ / o )_ / \----------------------------------------------/
; | ; ,__(_<` /
| / | \()
| /`\ ( | ;
\ \ | '-..-'; |\
'.;| ,_ _.= \ /`|
\ '. '-' |
\ '=. /
input {
syslog { }
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
#cloud-config
---
coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
# uncomment the following line and replace it with your discovery URL
discovery: https://discovery.etcd.io/5a402422ecc26c3f515ce6bc2bee398b
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
# give etcd more time if it's under heavy load - prevent leader election thrashing
@viglesiasce
viglesiasce / grafana-locust.json
Last active August 29, 2015 14:08
grafana-locust.json
{
"id": null,
"title": "Locust",
"originalTitle": "Locust",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"rows": [
@viglesiasce
viglesiasce / grafana_config.js
Last active August 29, 2015 14:08
grafana_config.js
define(['settings'],
function (Settings) {
return new Settings({
datasources: {
influxdb: {
type: 'influxdb',
url: "http://localhost:8086/db/locust",
username: 'admin',
password: 'admin',
default: true
@viglesiasce
viglesiasce / qa-init.sh
Created August 26, 2014 21:44
qa-init.sh
#!/bin/bash
#
# Script to add the git server ssh fingerprint key to the local system.
#
keyid='git.eucalyptus-systems.com,10.115.1.204 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA30Tu5JVIN9CikZh/4B0SUkgAZZh/2rVDb1hcijYmNUX85EdGRb8iwOoj3rKP7i56Hm3IB/zNRDi9biFb1mTxnmI4stGoHVRPe1M1B/D8ZEMP7XScAp0kqwWycxRnzXWqbNw5eoE8FzdmEhCuWdVVRsQea3NnCzaSHg013l1suLqCoDsHdszV8Fdj7QJ0UtpFc1KKaDg93mlTde7aop7nnJwhe3eZkw+9amhilAQl7kuWo/+f8cQ7w14ozYp9sgUJikD8m/V0pG9g81FUnwrKpJXuDmaJLBTFTSOGB+vbVQQTQciT3aplpBhl7Mx069gSEmYU4akqrO2S9s9pLKeotw=='
keyfile="$HOME/.ssh/known_hosts"
check_key=`grep -c "$keyid" $keyfile`