#!/usr/bin/perl
##############################################################################
# Perl script written by Vahid Hedayati May 2013
# nagalert.cgi - uses backend nagalert (service script - other script part of this project)
# Provides a web interface to stop/start alerts for selected host
# Script must be made available in the cgi-bin folder of the host running nagios
# Ensure you configure the first two variables to match your current setup
# status.dat and nagalert (bash script)
# When you load up the page, you will see the first action which is to enable/disable alerts
# for selected hosts.
# Once you have defined your action you can either select one host or use:
# 1. CTRL (selective multiple hosts, scroll down and select another whilst holding down control key)
# 2. SHIFT (select lots of hosts that are next to each other)
# Once selected If you are stopping define the time 1 - 24 then choose minutes, hours, days.
##############################################################################
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
"; print "\n"; print " | "; print "\n"; print " |