Skip to content

Instantly share code, notes, and snippets.

View captainark's full-sized avatar

CaptainArk captainark

View GitHub Profile
@captainark
captainark / checksoa.sh
Last active January 25, 2025 16:38
Script to compare serials of a DNS zone via monit/NRPE/etc.
#!/bin/bash
# Variables
MINNS=1
declare -a AUTHNS
# Functions
# Name: usage
# Description: shows how the script should be used and exists
@captainark
captainark / mmonit-discord-webhook.sh
Last active January 16, 2025 01:49
Sightly updated Discord webhook to use with M/Monit Alert Service
#!/bin/sh
if echo "$MONIT_EVENT" | grep -q "succeeded$"; then
DISCORD_TITLE="[M/Monit] OK Alert"
DISCORD_COLOR="5763719"
elif echo "$MONIT_EVENT" | grep -q "failed$"; then
DISCORD_TITLE="[M/Monit] Critical Alert"
DISCORD_COLOR="15548997"
elif echo "$MONIT_EVENT" | grep -Eq "changed$|matched$"; then
DISCORD_TITLE="[M/Monit] Warning Alert"