Sha256: 54bc7069f202f6aaa9859dd48ddb8ee88f0c6202b723e36ef9a0044fa203f0b5

Contents?: true

Size: 916 Bytes

Versions: 21

Compression:

Stored size: 916 Bytes

Contents

#!/bin/bash
#
# Copyright (c) 2009-2012 Lindsay Holmwood <lindsay@holmwood.id.au>
#
# flapjack-nagios-receiver
# reads from a nagios perfdata named-pipe and submits each event to the events queue in redis
#

PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local:/usr/local/sbin:/usr/local/bin:/usr/lib/flapjack/bin

# load global rbenv environment if present
if [ -x /etc/profile.d/rbenv.sh ] ; then
  source /etc/profile.d/rbenv.sh
fi

# Default return value
RETVAL=0

export FLAPJACK_ENV="production"

NAGIOS_PERFDATA_FIFO="/var/cache/nagios3/event_stream.fifo"

if [ ! $(which flapjack-nagios-receiver-control) ]; then
  echo "Error: flapjack-nagios-receiver-control isn't in PATH."
  echo "Refusing to do anything!"
  exit 1
fi

# Evaluate command

rbenv shell 1.9.3-p125 && flapjack-nagios-receiver-control $1 -- --config /etc/flapjack/flapjack-config.yaml --fifo ${NAGIOS_PERFDATA_FIFO}

RETVAL=$?
exit $RETVAL

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
flapjack-0.6.54 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.53 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.52 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.51 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.50 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.49 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.48 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.47 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.46 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.45 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.44 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.43 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.42 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.41 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.40 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.39 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.38 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.37 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.36 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.35 dist/etc/init.d/flapjack-nagios-receiver