#!/bin/sh

# this script sends alarms to dashboard for all services in OK status

if [ -f /etc/sysconfig/send-to-dashboard ] ; then
  . /etc/sysconfig/send-to-dashboard
else
  NAGIOS_ROLE=ngi
fi

/etc/init.d/nagios status 2>&1 > /dev/null
if [ $? -eq 0 ]; then
  /usr/sbin/nagios-notifications -command resend -status ALL -nagios-status OK -role $NAGIOS_ROLE
else
  echo "Nagios is not running, sending alarms aborted."
fi

