This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list | |
sudo apt-get install apt-transport-https | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get -y install oracle-java8-installer | |
sudo apt-get install elasticsearch | |
sudo /bin/systemctl daemon-reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'json' | |
require 'elasticsearch' | |
#My complex ES query, Basically detects port scanning via our network sflow data | |
json_search = '{ | |
"query": { | |
"filtered": { | |
"query": { | |
"query_string": { | |
"query": "*", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stmfadm create-hg blade07 | |
stmfadm add-hg-member -g blade07 eui.0002c9030055e715 eui.0002c9030055e716 | |
root@ssd-san:~# stmfadm list-hg -v | |
Host Group: blade07 | |
Member: eui.0002C9030055E716 | |
Member: eui.0002C9030055E715 | |
root@ssd-san:~# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: form_disk | |
### END INIT INFO | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin | |
case "$1" in | |
start) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ceph osd lost 16 --yes-i-really-mean-it | |
ceph osd crush remove osd.16 | |
ceph auth del osd.16 | |
ceph osd rm 16 | |
ceph osd create | |
ceph-osd -i 16 --mkfs --mkkey | |
ceph auth add osd.16 osd 'allow *' mon 'allow rwx' -i /var/lib/ceph/osd/ceph-16/keyring | |
ceph osd crush add osd.16 0.27 root=default host=node-118 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is really just notes Note an actual bash script for now | |
Note the below mappings for the DL380 G7 | |
eth0 0000:03:00.0 | |
eth1 0000:03:00.1 | |
eth2 0000:04:00.0 | |
eth4 0000:04:00.1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# note this isn't a script but just a list of bash commands to run, I may turn this into a scrpt later | |
echo "deb http://download.ceph.com/calamari/1.3.1/ubuntu/trusty/ trusty main" > /etc/apt/sources.list.d/calamari.list | |
gpg --keyserver keyserver.ubuntu.com --recv-key 460F3994 && gpg -a --export 460F3994 | sudo apt-key add - | |
echo "deb http://ppa.launchpad.net/saltstack/salt2014-7/ubuntu trusty main" > /etc/apt/sources.list.d/saltstack-salt-trusty.list | |
gpg --keyserver keyserver.ubuntu.com --recv-key 0E27C0A6 && gpg -a --export 0E27C0A6 | sudo apt-key add - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Obserivum Client Setup Script | |
## v.0.5 - 12/15/13 - [email protected] | |
## Tested on Debian 6/7 & Ubuntu 12.04+ - CentOS 5.8/6.4 | |
## Useage: ./observium-client.sh <Community> <Contact Email> | |
## check if root | |
if [ $(whoami) != "root" ]; then | |
echo "You need to run this script as root." | |
echo "Use 'sudo ./observium-client.sh' then enter your password when prompted." | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Creating the certs from pfx | |
openssl pkcs12 -nocerts -in ssl.pfx -out ssl.key -nodes | |
openssl pkcs12 -nokeys -clcerts -in ssl.pfx -out ssl.cer -nodes | |
openssl pkcs12 -nokeys -cacerts -in ssl.pfx -out ssl.crt -nodes | |
#Checking the certs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#New host | |
#Create a bank LV the same size as the source | |
lvcreate -L 400G -n kvm133_img vm_vg | |
#Old Host | |
#Creat a snapshot to stop any new data being written to the 400G LV, All changes get written to the snap lv now | |
lvcreate --snapshot -L10G -n kvm133-snap /dev/4tb_raid_vg/kvm133_img |
NewerOlder