Skip to content

Instantly share code, notes, and snippets.

View dieechtenilente's full-sized avatar

Klaus dieechtenilente

View GitHub Profile
@dieechtenilente
dieechtenilente / mount-qcow2-lvm.md
Created December 18, 2023 20:49
Mount a qcow2 Image with LVM on Ubuntu/Debian

Enable kernel extension

modprobe nbd max_part=8

Mount qcow2-Image

qemu-nbd --connect=/dev/nbd0 /var/lib/image.qcow2

or if the image is read-onlyy (e.g. from a snapshot)

@dieechtenilente
dieechtenilente / docker-compose.yml
Created March 8, 2023 19:03
Icinga Web2, InfluxDB docker-compose
version: '3.7'
services:
icingaweb2:
container_name: icingaweb2
image: icinga/icingaweb2:latest
restart: unless-stopped
environment:
- icingaweb.enabledModules=monitoring,graphite,grafana
- icingaweb.passwords.icingaweb2.icingaadmin="xxx"
- icingaweb.authentication.icingaweb2.backend="db"

PiHole Configuration

Resolving FQDN and hostnames of local DNS entries

  1. Create custom dnsmasq configuration
vim /etc/dnsmasq.d/00-custom-local-network-awareness.conf
# Used to resolve hostnames AND fqdns if only one is added as local dns record in PiHole
@dieechtenilente
dieechtenilente / pihole-whitelist
Last active February 17, 2023 11:23
Whitelist for PiHole or other DNS servers
# Amazon Android App
msh.amazon.co.uk
aax-eu.amazon.de
fls-eu.amazon.de
arcus-uswest.amazon.com
app-measurement.com
# DB Navigator App
siteintercept.qualtrics.com
st.bahn.de
@dieechtenilente
dieechtenilente / check_eaton.sh
Last active November 10, 2023 09:23
Nrpe/Icinga2 check for Eaton 3S 700 UPS connected via USB
#!/bin/bash
#Parameters
# https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash
POSITIONAL_ARGS=()
while [[ $# -gt 0 ]]; do
case $1 in
-m|--command)
command="$2"
@dieechtenilente
dieechtenilente / Eaton 3S 700 UPS.md
Last active December 26, 2022 15:28
Eaton 3S 700 on Linux (Debian/Proxmox)
@dieechtenilente
dieechtenilente / .vimrc
Created May 29, 2022 16:46
Neat .vimrc
" #Disable mouse click input
set mouse=c
" Disable compatibility with vi which can cause unexpected issues.
set nocompatible
" Enable type file detection. Vim will be able to try to detect the type of file in use.
filetype on
" Enable plugins and load plugin for the detected file type.
http://blog.e-shell.org/269
vgscan -v --mknodes
vgchange -a y
xfs_repair /dev/mapper/centos-root
optional: mount to replay xfs logs
@dieechtenilente
dieechtenilente / Proxmox Samba Container with ZFS.md
Last active January 3, 2023 12:58
Working Ubuntu Samba container on Proxmox running ZFS and adding snaphots made by sanoid as shadow copies

Proxmox, Ubuntu Container, Samba, ZFS, Sanoid Snapshot Tool

Set arc cache max limit (/etc/modprobe.d/zfs.conf) and reboot

# Max 8 GB Cache
options zfs zfs_arc_max=8589934592

Activate compression and deduplication