Skip to content

Instantly share code, notes, and snippets.

Avatar

Florian Heigl FlorianHeigl

View GitHub Profile
@FlorianHeigl
FlorianHeigl / local_check_quota.ps1
Last active May 4, 2021
check_mk local quota check - extended version
View local_check_quota.ps1
#Requires -Modules @{ ModuleName='FileServerResourceManager'; ModuleVersion='2.0' }
<#
.SYNOPSIS
Check_MK Plugin to monitor Quotas
.DESCRIPTION
Check_MK Plugin to monitor Quotas with FSRM Module.
.EXAMPLE
PS C:\> ./local_check_quota.ps1
@FlorianHeigl
FlorianHeigl / prereqs.md
Last active Apr 24, 2021
access checkliste
View prereqs.md

Frontend Node:

  • ssh key generated (tested format: rsa, 4k, no passphrase)
  • ssh key of the array is stored in .ssh/known_hosts
  • ssh key converted to ietf format
  • ~oneadmin/.ssh/config has been setup
  • ssh host key of both array controllers has been scanned
  • IQN from /etc/iscsi/initiatorname.iscsi has been collected
@FlorianHeigl
FlorianHeigl / rsync-copy.sh
Created Apr 18, 2021
fault tolerant rsync backup script
View rsync-copy.sh
#!/bin/bash -u
STOREDIR=/srv/backup
NICE="ionice -c3 nice -n 19"
run_rsync()
{
# use -vv to gather options for remote server to put in .ssh/authorized_keys
# that way you can limit rsync to intended use (sender will be fixed)
@FlorianHeigl
FlorianHeigl / vagrant-box-extract.sh
Created Apr 13, 2021
on-the-fly extracting images from vagrant box
View vagrant-box-extract.sh
gzip -dc windows2019-server-packer-template-libvirt-1618183429.box | tar -C /mnt/upload -xvf - box.img
View gist:f0cb46d95dfa69634ad64d0e36f51290
```
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
napalm-s350 0.3.1 requires napalm>=3.0.0, but you have napalm 2.5.0 which is incompatible.
napalm-s350 0.3.1 requires netmiko>=3.1.0, but you have netmiko 2.4.2 which is incompatible.
napalm-procurve 0.6.0 requires napalm>=3.0.0, but you have napalm 2.5.0 which is incompatible.
napalm-aos 0.2.1 requires napalm==2.3.1, but you have napalm 2.5.0 which is incompatible.
```
@FlorianHeigl
FlorianHeigl / junos-netflow.cmd
Last active Nov 7, 2020
Configure Juniper NFX NexGen NetFlow (inline)
View junos-netflow.cmd
set system ntp server ntp1.ispname.net
set interfaces ge-1/0/2 unit 0 family inet sampling input
set interfaces ge-1/0/2 unit 0 family inet sampling output
set services flow-monitoring version9 template ipv4-test ipv4-template
set forwarding-options sampling instance test-ins family inet input rate 100
set forwarding-options sampling instance test-ins family inet input run-length 19
set forwarding-options sampling instance test-ins family inet output flow-server 172.16.xx.xx port 2055
set forwarding-options sampling instance test-ins family inet output flow-server 172.16.xx.xx version9 template ipv4-test
set forwarding-options sampling instance test-ins family inet output inline-jflow source-address 192.168.x.x
@FlorianHeigl
FlorianHeigl / configure_apcupsd.md
Last active Nov 6, 2020 — forked from gschora/configure_apcupsd
configuring apcupsd to suspend all running VM and then shutdown the esxi 5.5 u1 host
View configure_apcupsd.md

Instructions

Description

these are instructions for automating the suspend and shutdown of ESXi VMs and host in case of a power failure. works with APC/Schneider SmartUPS 750xl and ESXi 5.5u1

Steps

  1. make a new VM and install Ubuntu-Server on it
@FlorianHeigl
FlorianHeigl / configure_apcupsd
Created Nov 6, 2020 — forked from gschora/configure_apcupsd
configuring apcupsd to suspend all running VM and then shutdown the esxi 5.5 u1 host
View configure_apcupsd
###############################################################################################################
# these are instructions for automating the suspend and shutdown of esxi vm's and host in case of a
# power failure.
# works with apc smartups 750xl and esxi 5.5u1
###############################################################################################################
0# make a new VM and install Ubuntu-Server on it
1# install apcupsd
apt-get install apcupsd
@FlorianHeigl
FlorianHeigl / jail.local
Created Oct 23, 2020 — forked from pida42/jail.local
Fail2Ban - SMTP fiters that helps me resolve attacked mail server with Postfix and Dovecot
View jail.local
## content of: /etc/fail2ban/jail.local
[mail-smtp]
enabled = true
logpath = /var/log/mail.log
filter = mail-smtp
maxretry = 1
action = iptables-multiport[name=mail-smtp, port="25,587", protocol=tcp]