Skip to content

Instantly share code, notes, and snippets.

@NiceRath
NiceRath / linuxha_cluster_floatingIP.txt
Last active May 13, 2024 14:43
LinuxHA (CRM/Corosync/Pacemaker) - Config for basic service cluster with floating IP
# bash > crm configure
primitive resHAProxy systemd:haproxy \
op monitor interval=5
clone clone_HAProxy resHAProxy
primitive resIP_LB IPaddr2 \
params ip=172.x.x.x nic=ens18 cidr_netmask=32 \
op monitor interval=10s \
meta target-role=Started
location cli-prefer-resIP_LB resIP_LB role=Started inf: node01 # prefer node01 if available
@NiceRath
NiceRath / recursive_file_checksum.sh
Created April 22, 2024 09:04
Script for recursive checksum over directory content
#!/usr/bin/env bash
# NOTES:
# perfoms md5sum on all files in the directory, sorts them and creates an overall md5sum
# WARNING: the sort order & checksum will change if you do not use the same LANG/LC_ALL!
EXCLUDES=('dir1' 'dir2/*')
set -eo pipefail
@NiceRath
NiceRath / graylog_pipeline_rules.md
Last active May 23, 2024 07:47
Graylog Pipeline Rules to extract fields for some common Services

Graylog menu: Graylog - System - Pipelines - Manage rules

All rules will assume you pre-filter your logs on an application-basis. Else the matching will get horrible.

Use regex101.com for testing expressions. Make sure to escape all the backslashes \\ (and so on..) before adding it as Graylog rule.

GENERIC: Use lookup tables to translate IPs to Hostnames

/*