This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# gist.github.com/eliphaslevy | |
# License: public domain | |
# Purpose: monitor interface for traffic spikes, capture some of it, and alert via email | |
# Run with environment DEBUG=1 set to see its output to terminal, | |
# otherwise will use 'logger' to write to syslog. | |
# I have put it on /etc/cron.d/cron.hourly to ensure it keeps running. | |
MYNAME=$(basename $0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
#coding:utf8 | |
# vim:et:ts=4:sw=4:sts=4:ai:si:foldmethod=indent | |
# shamelessly copied from perl 20_convert_geolite2 | |
# https://github.com/sander1/GeoLite2xtables | |
# (no perl modules in my server) | |
import os, sys, ipaddress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix for: | |
RIP: can't setsockopt IP_ADD_MEMBERSHIP No buffer space available | |
RIP: multicast join failed, interface FOO not running | |
Based on the patch for quagga from Michal Ruzicka | |
https://lists.quagga.net/pipermail/quagga-dev/2006-August/020891.html | |
Which was based on the one for zebra from Sergey Vlasov | |
https://bugzilla.altlinux.org/show_bug.cgi?id=3915 | |
--- frr-6.0.3.orig/ripd/ripd.h 2021-07-07 14:02:30.054026597 -0300 | |
+++ frr-6.0.3/ripd/ripd.h 2021-07-07 14:09:50.546026022 -0300 | |
@@ -249,6 +249,9 @@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# coding:utf-8 | |
# vim:ts=8:sw=8:si:ci:ai | |
""" | |
Automatically create zabbix host graphs based on LLD items. | |
Recursively gets all hosts that have the template(s) and adds/updates | |
one or more charts on each host. | |
Add the ID of the template to masterTemplates dict, and add graph filters | |
that will match the items on the host to graphItems. | |
Unlike the perl script linked below, this script was built to generate one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:global timeToSeconds do={ | |
:local iSeconds 0; :local upTxt $1; :local daypos 0; | |
:for pos from=0 to=([:len $upTxt] - 8) do={ | |
:if ([:pick $upTxt $pos] = "w") do={ | |
:set iSeconds ( [:pick $upTxt 0 ($pos)] * 7 * 24 * 60 * 60 ); | |
:set daypos ($pos+1); | |
} | |
:if ([:pick $upTxt $pos] = "d") do={ | |
:set iSeconds ( $iSeconds + ([:pick $upTxt ($daypos) ($pos)] * 24 * 60 * 60) ); | |
} |