Sha256: 3893e7feee60bd377ee427696975c1e25932f31433be1c4a572b231c6c63984d

Contents?: true

Size: 889 Bytes

Versions: 2

Compression:

Stored size: 889 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) ]; then
  echo "Error: flapjack-nagios-receiver isn't in PATH."
  echo "Refusing to do anything!"
  exit 1
fi

# Evaluate command

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

RETVAL=$?
exit $RETVAL

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flapjack-0.6.56 dist/etc/init.d/flapjack-nagios-receiver
flapjack-0.6.55 dist/etc/init.d/flapjack-nagios-receiver