Skip to content

Instantly share code, notes, and snippets.

wget https://artifacts.elastic.co/downloads/kibana/kibana-5.6.0-amd64.deb
dpkg -i kibana-5.6.0-amd64.deb
systemctl daemon-reload
systemctl enable kibana.service
systemctl start kibana.service
apt install default-jdk
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
apt install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
apt update && apt install elasticsearch
sed -i "/# network.host: 192.168.0.1/c network.host: 0.0.0.0" /tmp/foo/etc/elasticsearch/elasticsearch.yml
/bin/systemctl daemon-reload
/bin/systemctl enable elasticsearch.service
/bin/systemctl start elasticsearch.service
@gwynp
gwynp / home-media-docker-compose.yml
Last active October 24, 2022 09:15
Home Media Docker Compose File
version: "2"
services:
sabnzbd:
environment:
- PGID=1000
- PUID=1000
image: linuxserver/sabnzbd
container_name: sabnzbd
# keeps servers up and running and starts on boot
@gwynp
gwynp / aws-blog.yml
Last active September 22, 2020 15:34
Simple Ansible playbook to create ELB and EC2 instances on AWS for a blog
---
- name: A simple Load Balanced AWS blog using the Amazon standard linux AMI
hosts: localhost
connection: local
gather_facts: False
tasks:
- name: spin up the webserver instances
ec2:
key_name: my-aws-key
group: web
@gwynp
gwynp / storage-aggregation.conf
Created September 24, 2014 19:52
carbon storage-aggregation.conf for use with graphite and stasd
[min]
pattern = \.min$
xFilesFactor = 0.1
aggregationMethod = min
[max]
pattern = \.max$
xFilesFactor = 0.1
aggregationMethod = max
@gwynp
gwynp / vmstatCheck.sh
Created June 19, 2012 18:02
vmstat check for swapping
#!/bin/bash
vmstat 5 1|tail -1|awk '{print $7,$8}' | while read vmstatResults;
do
SI=$(echo $vmstatResults | awk '{Print $1}')
SO=$(echo $vmstatResults | awk '{Print $1}')
if [[ $SI -gt 0 || $SO -gt 0 ]]
then
echo "swapping is showing as greater than zero in vmstat"
@gwynp
gwynp / swapCheck.sh
Created June 19, 2012 18:01
swap check
SWAPPING=`free -mo | grep Swap | { read a b c d; echo $c; }`
if [[ $SWAPPING -gt 0 ]]
then
echo "swap space is showing being used by free"
return 1
else
echo "free is showing no swap space being used"
return 0
fi