Problem with Event Handler {Disarmed} {Fraud?}
Miguel Angel
ing.miguel.angel at gmail.com
Fri Apr 11 20:57:49 CEST 2008
Hi again list!
The jobs named exactly like Nagios:
In Nagios (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 Bacula (bacula-dir.conf):
JobDefs {
Name = "scliente"
Type = Backup
Level = Incremental
Client = scliente-fd
FileSet = "MyDocs"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = Inc-Pool
Priority = 10
}
When I launch a backup from console for client "scliente", I use:
$ echo "run scliente yes" | bconsole
When I execute "tail -f /var/log/nagios/nagios.log" in console, show this:
[1207936526] HOST EVENT HANDLER: scliente;DOWN;SOFT;1;launch-bacula-jobs
[1207936526] HOST ALERT: scliente;UP;SOFT;2;PING OK - Packet loss = 0%, RTA
= 2.41 ms
The route of Event handler is: "/usr/lib/nagios/plugins/eventhandlers"
$ ls -lt
-rwxr-xr-x 1 root root 568 abr 10 20:00 launch-bacula-jobs
Please help!
On Fri, Apr 11, 2008 at 2:17 AM, Arno Lehmann <al at its-lehmann.de> wrote:
> Hi,
>
> 11.04.2008 07:24, Marc Powell wrote:
> > On Apr 10, 2008, at 9:44 PM, Miguel Angel wrote:
> >> 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
> >
> >> UP)
> >> echo "The host is UP. Start backup to $1"
> >> echo "run $1 yes" | bconsole
> >> ;;
> >>
> > Educated guess - bconsole isn't in the environment path when nagios
> > executes the event handler. You can expect to have a minimal
> > environment and should specify full paths to files and programs. Also
> > make sure that the nagios user can successfully run that command.
>
> Also, it's much safer to pass the configuration file to use to
> bsonsole. So you should end up with something like "/sbin/bconsole -c
> /etc/bacula/bconsole.conf"
>
> Things might even be more comlicated.
>
> Your $1 in the event handler script holds the host name as defined in
> Nagios. That is not necessarily the name of any Bacula job.
>
> Of course you could define the jobs with the plain host name, but for
> reasons of manageability and flexibility I usually recommend a
> different naming scheme for the jobs.
>
> For example, on host sample with Bacula file daemon sample-fd you
> might have the jobs Sample-root Sample-home and Sample-data. For many
> Bacula installations, you soon discover that you need several jobs to
> take different needs regarding retention times, storage pools, or
> special backup procedures into account.
>
> As long as you really only need one job named exactly like the Nagios
> host name, your setup is ok, though.
>
> Arno
>
> > --
> > Marc
>
> --
> Arno Lehmann
> IT-Service Lehmann
> www.its-lehmann.de
>
> -------------------------------------------------------------------------
> 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
> _______________________________________________
> 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
>
--
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/20080411/b724d2ea/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