Skip to content

Instantly share code, notes, and snippets.

@psi-4ward
psi-4ward / docker-powerdns-servicediscovery.sh
Created April 15, 2015 08:54
Service Discovery for Docker to update PowerDNS MySQL
#!/bin/bash
# watch events until infinity
UNTIL=99999999999
# respect events 30sec in the past to not forget
# started containers AFTER "register running" but BEFORE event listener starts
SINCE=$(expr `date +%s` - 30)
DOMAIN=fubar
@DavidWittman
DavidWittman / supermicro-ipmi-mac-address.md
Last active August 17, 2023 08:05
Pull the LAN1/eth0 MAC address from SuperMicro IPMI

You can find the MAC address for LAN1/eth0 (not the BMC MAC) via the SuperMicro IPMI interface by running the following command:

$ ipmitool -U $IPMI_USER -P $IPMI_PASS -H $IPMI_HOST raw 0x30 0x21 | tail -c 18

The eth0 MAC address will be output in this format:

00 25 90 f0 be ef
@smougenot
smougenot / A_Logstash.conf
Created July 26, 2012 13:59
Logstash Multiline Filter for Java Stacktrace (tested on field)
# stacktrace java as one message
multiline {
#type => "all" # no type means for all inputs
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)"
what => "previous"
}