Problem with Event Handler
Miguel Angel
ing.miguel.angel at gmail.com
Fri Apr 11 04:44:54 CEST 2008
Hi
First of all, I would like to apologize for my english.
I need your help, I'm trying to configure Nagios (version 2.5) for launch
backups with Bacula (www.bacula.org), for that I'm use a Event
Handler. Myproblem is that I've configure Nagios for start this event,
I'm new in the Event Handlers theme. The most importan parts of my nagios
configuration:
In "nagios.cfg":
enable_event_handlers=1
In "bigger.cfg":
# 'scliente' host definition
define host{
use generic-host
host_name scliente
alias scliente - Desktop
address 192.168.101.14
parents vs1-dhcp
check_command check-host-alive
max_check_attempts 10
check_period 24x7
notification_interval 120
notification_period workhours
notification_options d,u,r
event_handler launch-bacula-jobs
contact_groups desktop-admins
}
In "checkcommads.cfg":
# 'launch-bacula-jobs' command definition
define command{
command_name launch-bacula-jobs
command_line $USER2$/eventhandlers/launch-bacula-jobs $HOSTNAME$
$HOSTSTATE$ $HOSTSTATETYPE$
}
My Script is "/usr/lib/nagios/plugins/eventhandlers/launch-bacula-jobs"
#!/bin/sh
# LAUNCH BACULA JOBS EVENT HANDLER SCRIPT
# Written By: Skina Technologies (skina at skinatech.com)
# Last Modified: 04-04-2008
echo "Bacula Event Handler Script"
echo "HOSTNAME: $1"
echo "HOSTSTATE: $2"
echo "HOSTSTATETYPE: $3"
# Only take action on hard host states...
case "$3" in
HARD)
case "$2" in
DOWN)
echo "The host is DOWN"
;;
UP)
echo "The host is UP. Start backup to $1"
echo "run $1 yes" | bconsole
;;
esac
;;
esac
exit 0
What is the problem????
Thanks, any help would be greatly appreciated.
--
Atentamente,
Miguel Angel Moreno Bolaños
Usuario Linux registrado No. 391784
http://counter.li.org
"El amor es un dolor entre pecho y espalda,
que sabe a papas fritas sin salsa de tomate!"
Att: Nous
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080410/f582406e/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list