[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [hobbit] trouble with SCRIPT directive
- To: <hobbit (at) hswn.dk>
- Subject: RE: [hobbit] trouble with SCRIPT directive
- From: "Hubbard, Greg L" <greg.hubbard (at) eds.com>
- Date: Mon, 7 Jan 2008 08:29:58 -0600
- References: <000001c84fb9$65676c80$30364580$ (at) net>
- Thread-index: AchPuWHley/R3FeiRm2i1kUxz0XE3gBgAHEw
- Thread-topic: [hobbit] trouble with SCRIPT directive
Kevin,
The "simplest" way around this problem is not to try to embed a trapgen
call into the script directive, but to write a wrapper script that will
accept whatever arguments that SCRIPT sends, and then provides any
format conversion, etc. needed before calling trapgen (or any other
program). Seems like I had to grab a lot of info out of environment
variables when I wrote one of these a year or so ago, so you would be
extremely lucky if you could do it all in one step.
GLH
________________________________
From: kevin [mailto:khanrahan (at) charter.net]
Sent: Saturday, January 05, 2008 10:38 AM
To: hobbit (at) hswn.dk
Subject: [hobbit] trouble with SCRIPT directive
Hi all,
This might seem long winded but I wanted to describe the problem
in detail and see if anyone could help please.
I am trying to make use of the SCRIPT function in
hobbit-alerts.cfg I am trying to send snmp traps from hobbit to another
receiver using a utility called trapgen and I think the syntax of SCRIPT
and trapgen are getting in each others way.
SCRIPT seems to have this syntax:
SCRIPT <program> <recipient> <options>
And trapgen has this syntax:
trapgen -d destination <options>
So, when I try to assemble it, it has this form:
SCRIPT /home/hobbit/server/ext/trapgen -d 10.10.0.13 <options>
I get an error in the page.log that says trapgen needs at least
a destination specified as:
trapgen -d IPADDRESS ......but it DOES have a destination!!!
It seems that the SCRIPT directive is intercepting the "-d
IPADDRESS" and interpreting it as it's own "recipient" directive.??
Is there a way around this? Is there a way to ignore the
"recipient" directive using SCRIPT?
Thanks for any ideas
KEvin