Skip to content

Instantly share code, notes, and snippets.

@gardenmwm
gardenmwm / check_redisqueue
Created July 16, 2015 23:28
Quick script for checking size of a redis queue
#!/bin/bash
# nagios plugin check_redisqueue
#
# check size of redis queue, doesn't use option flags, so
# check_redisqueue <queuename> <warn> <crit>
# If you don't want graphite set below to 0
#command vars
142 func grokline(match grok.Match) map[string][]string {
143 fields := make(map[string][]string)
144 defer func() {
145 if e:= recover(); e!= nil {
146 fmt.Println("Recovering",e)
147 }
148 }()
149 panic("Panicing")
150 match.Captures()
151 return fields
# This is currently a noop but will be supported in the future.
forge 'https://forge.puppetlabs.com'
#ROLES/PROFILES
mod 'roles',
:git => 'git@lnx-gitlab.adeq.lcl:puppet-modules/roles.git'
mod 'profiles',
:git => 'git@lnx-gitlab.adeq.lcl:puppet-modules/profiles.git'
import sys
record=[]
for line in sys.stdin:
if len(record) < 2 and line != '\n':
record.append(line.strip())
elif len(record) == 2:
print record
record=[]
sys.stdout.flush()
else: