Re: [nv-l] Slot mapping
"Delaire, Patrick" <delairep AT aetna DOT com> writes:
> Does anyone on this list know how to pass individual words in an alert to
> TEC from netview using slot mapping definitions.
> I'm not referring to variable binds but for instance, how do I pass the
> second word in variable bind #3 in a slot map to TEC?
> all suggestion will greatly appreciated.
The Internal TEC adapter does not afford you this sort of
flexibility, nor does anything you can throw at trapd.conf or the trap
settings window in message slot definitions.
To do this sort of thing, you will have to pass the event to an
external script that ultimately calls postemsg to send the TEC
event. It sounds scary but it's actually quite simple to do, and is
in fact they way we handle all our events.
You have a couple ways to pass the event to an external script. One
is in the trap settings dialog box "Command for automatic action," or
identially, adding a -C switch to the "addtrap" command that defines
a given trap (see man addtrap for details). The other way you can do
it is by using an Action node in a correlation ruleset (if you're
In the script, your varbinds will be accessible for processing as
environment variables. Then you can use awk or what have you to
isolate the second work in varbind 3 to form as an agument to your
postemsg command that sends the event to TEc with the slots populated
as you wish.