No, not even close. What this means is that there are no variables used in
this trap message at all, and that's what NVATTR_1 through NVATTR_50
display, namely, trap variables. If you read the man page on trapd.conf
you will see that $A is the agent address and that is all that is being
used here. The rest is hard coded text. The words "UPS" and "diagnostic
selftest ok" do not come from the trap at all, trapd.conf provides them.
If this is what you want to pass to your script in an action node in a
ruleset, you would do it just like trapd does it:
/<path>/myscript "UPS $NVA diagnostic selftest ok"
You cannot tell from the trapd.conf entry if there even are any variables
included in this trap.. To do that you would have to do as I suggested
before: add $* at the end of that message (please use event
configuration and do not attempt to edit trapd.conf) so that the next time
it comes in all variables supplied with it will be displayed. You can
always remove the $* later after you have seen what you need.
James Shanks
Tivoli (NetView for UNIX) L3 Support
Matt Ashfield <mda@UNB.CA> on 05/26/99 08:33:18 AM
Please respond to Discussion of IBM NetView and POLYCENTER Manager on
NetView <NV-L@UCSBVM.UCSB.EDU>
To: NV-L@UCSBVM.UCSB.EDU
cc: (bcc: James Shanks/Tivoli Systems)
Subject: Re: $NVATTR attribute
James,
I was looking at the entry for this trap in /usr/OV/conf/C/trapd.conf and
thsi is what I found:
upsDiagTestOK {.1.3.6.1.4.1.705.1.11} 6 46 A 3 0 "All Category Events"
UPS $A diagnostic selftest ok
EXEC /usr/OV/contrib/NNM/mg/actions/trap.action $A 46
DISPLAY UPS $A diagnostic selftest ok
SDESC
This trap is sent by the UPS when it's diagnostic selftest succeeded
Wouldn't his mean that NVATTR_1 = A and NVATTR_2 = 3 etc..?
Cheers
Matt
-----Original Message-----
From: James Shanks <James_Shanks@tivoli.com>
To: NV-L@ucsbvm.ucsb.edu <NV-L@ucsbvm.ucsb.edu>
Date: Tuesday, May 25, 1999 6:15 PM
Subject: Re: $NVATTR attribute
>Keep cool.
>Bring up Event Configuration and look at this trap. What does the event
>log message say?
>
>I'll bet it is NOT something simple like $3 or $4. What exactly is it?
>
>James Shanks
>Tivoli (NetView for UNIX) L3 Support
>
>
>
>Matt Ashfield <mda@UNB.CA> on 05/25/99 01:29:26 PM
>
>Please respond to Discussion of IBM NetView and POLYCENTER Manager on
> NetView <NV-L@UCSBVM.UCSB.EDU>
>
>To: NV-L@UCSBVM.UCSB.EDU
>cc: (bcc: James Shanks/Tivoli Systems)
>Subject: Re: $NVATTR attribute
>
>
>
>
>
>I have used the $NVATTR_ variable in other scripts, but this one is giving
>me problems.
>I just did what you said, with the nvcorrd and you were right, it doesn't
>contain the info I want. The UPS is sending the trap, and it's getting
>processed, but $NVATTR_ variables do not contain the same type of info as
>traps received from other enterprises.
>The question I have then is how come in my control desk I have a
>description
>of the trap. If it's there, shouldn't I be able to pass it in a script
>somewhere? Or is Netview just looking at the trap number, and doing a
>lookup
>of the description for trap and displaying it? I figure if the info is in
>the control desk, I should be able to get at it...
>
>Thanks
>
>Matt
>mda@unb.ca
>
>
>-----Original Message-----
>From: Jan Green <greenjan@yahoo.com>
>To: NV-L@ucsbvm.ucsb.edu <NV-L@ucsbvm.ucsb.edu>
>Date: Tuesday, May 25, 1999 2:04 PM
>Subject: Re: $NVATTR attribute
>
>
>>Matt -
>>
>>You shouldn't have any problems, I use NVATTR_3 when
>>passing Netfinity traps to Netview, I use rulesets,
>>pass the variable to a pager node and it pages me with
>>the text of the trap.
>>
>>Perhaps $NVATTR_3 does not contain the info you
>>expect?
>>
>>Run nvcdebug -d all then look at the format of the
>>trap in the nvcorrd.alog or nvcorrd.blog to be sure
>>that is the variable you want.
>>
>>Other than that, AIX may have a problem passing a
>>string of characters as a variable to a script.
>>
>>Jan
>>
>>
>>
>>--- Matt Ashfield <mda@UNB.CA> wrote:
>>> Hi all,
>>>
>>> I'm running some UPS monitoring software which
>>> integrates with NetView. I am receiving traps from
>>> it and am now trying to write a script which
>>> processses the trap. I am trying to send an email
>>> containing the description of the trap. I invoke the
>>> script when I receive a trap from the UPS, with the
>>> following action:
>>>
>>> /scripts/ups $NVATTR_3
>>>
>>> I have tried $NVATTR_3 but I just get an output of
>>> 3 instead of the description of the trap.
>>>
>>> /scripts/ups $NVC which should give the community
>>> name and $NVT which gives me the timestamp, and
>>> these works, so the functionality of the script
>>> works fine.
>>>
>>> Since it's a private enterprise mib, would that
>>> affect the functionality of $NVATTR_ or am I simply
>>> querying the incorrect value...
>>>
>>> I'm running NV 5.1.1, on aix 4.3.2...
>>>
>>> THanks
>>>
>>> Matt
>>> mda@unb.ca
>>>
>>>
>>>
>>>
>>
>>_________________________________________________________
>>Do You Yahoo!?
>>Get your free @yahoo.com address at http://mail.yahoo.com
>>
>
|