Executing custom/misc commands problem
Jamin
jragle at unm.edu
Tue Jan 14 22:20:54 CET 2003
The execution of the nagios user is allowed and the nfs file is exported.
... testing ...
Ah ha! I think I narrowed the problem down to the parsing of commands
with arguments in nagios. The problem is, the C program I pass off the
arguments to parses on semicolons for the different fields. (Yeah, I
know. Its bad, but I didn't write the dang thing.)
______________________________________________________________________________
This is the problem here. Example line I want executed::
/nfs/user/j/jragle/bin/testit.pl HostDown "severity:1;title:alert - Host
$HOSTNAME$ is $HOSTSTATE$;description:Host $HOSTALIAS$ is $HOSTSTATE$ at
$SHORTDATETIME$;"
AND Nagios thinks it is this:: (via view config)
nfs/user/j/jragle/bin/testit.pl HostDown "severity:1
______________________________________________________________________________
I tried to 'escape' the semicolon with '\;', but that resulted as the same
as above, but with a '\' character tacked on the end of the nagios line.
Anyone have any idea how to get the nagios parsing to include the
semicolons??
Thanks for the input all!
-Jamin
On 13 Jan 2003, Pascal Miquet wrote:
> I would suggest to check if the execution of the nagios user is allowed.
> Also take a look if the nfs file is exported ?
>
> Regards
> P.Miquet
>
> Le sam 11/01/2003 à 19:48, Jamin a écrit :
> > Hello fellow nagios users,
> > I'm trying to integrate nagios into our paging and problem
> > management software right now but am having problems getting nagios to
> > execute the perl script that initiates the pages and tickets.
> >
> > In the etc/misccommands.cfg file I am trying to do something similar to
> > the notify-by-epager command but instead of using printf and mail, I am
> > trying to execute the command which contacts the problem management
> > software.
> >
> > Here is a simplified command where the 'hello' part is actually the second
> > argument which describes the problem.
> >
> > # Test 'host-notify-by-CIRTpager' command definition
> > define command{
> > command_name host-notify-by-CIRTpager
> > command_line /nfs/e1/oper/PAGER/scauto/linuxevprob.pl HostDown hello
> > }
> >
> > I added some lines in the perl file which appends the 2nd argument to a
> > file in /tmp, just so I know if the file is being executed, but
> > apparently, it is never executed by nagios because the file is empty.
> >
> > The permissions on the file are good, and it executes normally when done
> > by hand. It just seems to not work in nagios. I checked the notification
> > history, and nagios seems to think it was executed, but there is never
> > anything in the /tmp file when nagios tries to run the command.
> >
> > Anyone have any suggestions? I would appreciate any help.
> > Thanks,
> > -Jamin Ragle
> > SA for CIRT
> > ______________________________________________________________________
> > Multi-Slacking - "I can only do one thing at a time, but I can avoid
> > doing many things simultaneously." -- Unknown
> > ______________________________________________________________________
> >
> >
> >
> > -------------------------------------------------------
> > This SF.NET email is sponsored by:
> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> > http://www.vasoftware.com
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
>
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by: FREE SSL Guide from Thawte
> are you planning your Web Server Security? Click here to get a FREE
> Thawte SSL guide and find the answers to all your SSL security issues.
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
>
----------------------------------------------------------------------
It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed.
The hands acquire shaking.
The shaking becomes a warning.
It is by caffeine alone I set my mind in motion. -Influenced by Dune
----------------------------------------------------------------------
-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving
your online business a competitive advantage. Test-drive a Thawte SSL
certificate - our easy online guide will show you how. Click here to get
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
More information about the Users
mailing list