Problem with Event Handler {Disarmed} {Fraud?}
Arno Lehmann
al at its-lehmann.de
Fri Apr 11 17:02:15 CEST 2008
Hello,
please, reply to the list or I might send an invoice ;-)
Of course, others might profit from the archives, too.
11.04.2008 14:53, Miguel Angel wrote:
> maybe the Nagios user no have permisions to execute "bconsole"???
>
>
>
> On Fri, Apr 11, 2008 at 7:16 AM, Miguel Angel
> <ing.miguel.angel at gmail.com <mailto:ing.miguel.angel at gmail.com>> wrote:
>
> Hi Arno, :)
>
> The jobs named exactly like Nagios:
Good. As long as it works for you that's ok, of course.
> In Nagios (bigger.cfg)
...
> When I launch a backup from console for client "scliente", I use:
> $ echo "run scliente yes" | bconsole
Well, keep in mind what Marc pointed out - the environment Nagios uses
to execute scripts is seriously stripped down.
> Arno, in the "Event Log" in Nagios, appear this:
> [04-10-2008 21:55:42] Warning: Attempting to execute the command
> "/eventhandlers/launch-bacula-jobs registros DOWN HARD" resulted in
> a return code of 127. Make sure the script or binary you are trying
> to execute actually exists...
I'm rather sure you won't find the /eventhandlers/launch-bacula-jobs
existing and executale by nagios.
Use a fully qualified path for the command and have the script be
owned and executable by the nagios user. The directories leading to it
should also be r-x for nagios.
So, do a 'ls -l /eventhandlers/launch-bacula-jobs' and see if it's
usable by Nagios.
Arno
>
> [04-10-2008 21:55:42] HOST EVENT HANDLER:
> registros;DOWN;HARD;10;launch-bacula-jobs
>
>
> Please help!
>
>
>
>
>
>
> On Fri, Apr 11, 2008 at 2:17 AM, Arno Lehmann <al at its-lehmann.de
> <mailto: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 <http://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
> <mailto: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
>
>
>
>
> --
> 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
--
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
More information about the Users
mailing list