Dirk,
As I remember the $NVATTR_4 returns the event message, 'Interface Serial0
Down'
if you use netmon polling.
A simle way to extract the interface name via a small script is to call
it with this parameter ($NVATTR_4) like below :
#!/bin/ksh
# This script extract parameter $2 from from $NVATTR_4 (Interface 'name'
Down) # wich will return the 'name' of the interface
IFNAME=´echo $2´
.....
other commands
..
If the scriptname is 'getifname', you call it with 'getifname $NVATTR_4'
(for example as action in a ruleset)
/Erik
At 16:28 1999-02-15 +0100, you wrote:
>Hi there,
>
>i want to run a shell-script, which i have to invoke with some parameters. I
>found
>$NVATTR_2 is "host name to which trap applies" and $NVA is "agent address".
>But I need to pass the name of the interface the caused the trap!
>Example: Router 1.1.1.1 (test) has an interface 1.1.1.2 (testi1). When
>testi1 "breaks"
>down the router sends a trap: Origin "test", message: "Interface testi1
>down." I want
>to run a script which gets "testi1" as a parameter. How is this name as a
>variable or
>however?
>Thank you in advance.
>
>
>Best regards
>
>Dirk Goeldner Lufthansa Systems
>Bachelor of Applied Computer Sience Desktop and Network Services
>Avitrium, Room 2.07 FRA AK/E-EN
>Tel: +49-69-696-90280 Im Taubengrund 6
>Fax: +49-69-696-96790 65451 Kelsterbach, Germany
>
>
------------------------------------------------
Erik Nilsson
Network Management tcpip AB
Box 38117, 100 64 Stockholm
Tel: +46 (0)8 720 53 90, Fax: +46 (0)8 720 53 92
Mobile: +46 (0)708 15 76 52
E-mail: erik@netman.se
|