Skip to content

Instantly share code, notes, and snippets.

Karol Babioch kbabioch

View GitHub Profile
@kbabioch
kbabioch / keybase.md
Created May 13, 2015
Keybase identity proof for kbabioch
View keybase.md

Keybase proof

I hereby claim:

  • I am kbabioch on github.
  • I am kbabioch (https://keybase.io/kbabioch) on keybase.
  • I have a public key whose fingerprint is 758A B783 45F8 9BD7 CFE6 615D 749A 65CD 479F 3215

To claim this, I am signing this object:

@kbabioch
kbabioch / check_myip
Created Apr 22, 2017
Checks whether the given hostname matches the own external IP address. The external IP address is determined by querying https://myip.babioch.de.
View check_myip
#! /bin/sh
# Copyright (c) 2017 Karol Babioch <karol@babioch.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@kbabioch
kbabioch / check_postfix_log.go
Created Nov 9, 2017
Analyzes mail log files from Postfix (in Go)
View check_postfix_log.go
package main
import (
"bufio"
"flag"
"fmt"
"os"
"regexp"
"strconv"
"time"
@kbabioch
kbabioch / check_postfix_log.py
Created Nov 9, 2017
Analyzes mail log files from Postfix (in Python)
View check_postfix_log.py
#! /usr/bin/env python
from datetime import datetime, timedelta
from optparse import OptionParser
import sys
import re
# TODO Read log lines backwards
desc="""This is a simple Nagios plugin that will analyze the mail log from
@kbabioch
kbabioch / check-soa-consistency.py
Created Feb 9, 2019
Checks for consistency of SOA records in zone belonging to a given name on all authoritative nameservers
View check-soa-consistency.py
#! /usr/bin/env python3
import argparse
import logging
import re
import subprocess
import sys
# Exit codes
EXIT_OK = 0
@kbabioch
kbabioch / check-nsec3param
Created Feb 14, 2019
Checks NSEC3PARAM for a given zone
View check-nsec3param
#! /usr/bin/env python3
#
# Copyright (c) 2019 Karol Babioch <karol@babioch.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@kbabioch
kbabioch / check_systemd_failed
Created Jun 3, 2019
This is a very simple script that will check for failed systemd units by parsing the output of systemctl(1).
View check_systemd_failed
#!/usr/bin/env python3
# Copyright (c) 2019 Karol Babioch <karol@babioch.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@kbabioch
kbabioch / hooks.py
Created Jun 7, 2018
Prototype of a hook for urlwatch to retrieve releases from GitHub via official API
View hooks.py
# Copyright (c) 2018 Karol Babioch <karol@babioch.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
You can’t perform that action at this time.