Skip to content

Instantly share code, notes, and snippets.

View jserviceorg's full-sized avatar

Juergen Gotteswinter jserviceorg

  • Regensburg - DE
View GitHub Profile
@jserviceorg
jserviceorg / gist:27f2e544fee08c081bd3694eeb34a02c
Last active September 23, 2021 20:46
statgrab to influx via telegraf/netcat
statgrab -b | grep -E '[0-9]+' | tr -s ": " ":" | tr -s "." "_" | awk '{print $0"|c"}' |awk '/[0-9]/' |nc -C -w 1 -u localhost 8125
@jserviceorg
jserviceorg / elasticache_dump_to_rdb.md
Created May 28, 2021 07:36 — forked from lmmendes/elasticache_dump_to_rdb.md
Save Amazon ElastiCache Redis to file dump.rdb

Instructions to DUMP localy a Elasticache Redis database

Connect to Redis CLI

$ redis-cli

Enable the current redis as a slave for the master node

@jserviceorg
jserviceorg / gist:b892cbe3d1461c34c56cf0f6c809584d
Created April 11, 2020 19:22
list must have packages debian/ubuntu
# get a list of all packages which are required for minimum os operation
aptitude search '?essential' or dpkg-query -Wf '${Package;-40}${Essential}\n' | grep yes
@jserviceorg
jserviceorg / debian-install-zram.sh
Last active June 19, 2019 19:30
Install zRAM on Debian(8)
#!/bin/bash
#
not_root() {
echo "ERROR: You have to be root to execute this script"
exit 1
}
zram_exists() {
echo "ERROR: /etc/init.d/zram already exists"
@jserviceorg
jserviceorg / prometheus-extra-etcd-instance.yaml
Created June 13, 2019 13:07 — forked from jhohertz/prometheus-extra-etcd-instance.yaml
Enable prometheus monitoring of etcd and etcd-events on kops clusters
# To be used with current stable/prometheus-operator helm chart on kops clusters
# where 4001/4002 ports are blocked from the worker nodes
#
# In you helm, disable etcd monitor by setting kubeEtcd.enabled=false
# Then apply this yaml, and you should see the etcd stats on your main instance
#
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus-operator-prometheus-master
@jserviceorg
jserviceorg / rsnapconfig.yml
Last active December 7, 2018 11:45
create rsnapshot hostlist for rsnapshot
---
- hosts: backup
tasks:
- name: generate hostlist root backup for rsnapshot
lineinfile: "dest=/opt/rsnapshot/rsnapshot.conf
line='{{ item }} / {{ item }}/'
state=present"
with_items:
- "{{ groups['all'] }}"
- name: generate hostlist root backup for rsnapshot
@jserviceorg
jserviceorg / plot_bonnie.sh
Created July 16, 2018 09:01 — forked from npinto/plot_bonnie.sh
plot_bonnie.sh
#!/bin/bash
#
# script formats bonnie output and calls gnuplot to create a png graph
# of various bonnie parameters.
#
# feed script bonnie++ output - it will attempt to find the last line of bonnie output
# which is all it really cares about anyway
#
# eg: Using uid:65534, gid:65534.
# Writing a byte at a time...done
@jserviceorg
jserviceorg / gist:02d304cf72d8af1e464ce42fb659bbb1
Created February 21, 2018 21:20
freebsd 11 server make.conf
CPUTYPE?=native
OPTIONS_SET=OPTIMIZED_CFLAGS CPUFLAGS
OPTIONS_UNSET=CUPS DEBUG DOCS FONTCONFIG NLS X11
WITHOUT_MODULES=sound ntfs linux
WITHOUT_X11=yes
DEFAULT_VERSIONS+=ssl=openssl
@jserviceorg
jserviceorg / gist:252fbce379044c5ff7d478506d092454
Created February 21, 2018 11:15
illumos link link aggregation
dladm create-aggr -d nic1 -d nic2 -L active aggr0
@jserviceorg
jserviceorg / gist:7b34367e698ba14019186649acfea7a3
Created February 19, 2018 11:34
get zfs snapshot daily space usage
zfs list -Hp -t snapshot |grep 2018-02-17 | awk {'print $2'} |awk '{ sum+=$1} END {print sum}'