[Top] [All Lists]

[nv-l] Ruleset that sends new trap with custom info.

To: nv-l@lists.us.ibm.com
Subject: [nv-l] Ruleset that sends new trap with custom info.
From: "Clinkscales, Charles" <cclinkscales@firstam.com>
Date: Wed, 28 Dec 2005 13:48:36 -0600
Delivery-date: Wed, 28 Dec 2005 19:49:52 +0000
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
Reply-to: nv-l@lists.us.ibm.com
Sender: owner-nv-l@lists.us.ibm.com
Thread-index: AcYL57EoZw5c//NNQi+57ruLHYK+0A==
Thread-topic: Ruleset that sends new trap with custom info.

Hello All - I am running Netview version 7.1.4 fixpack 2 on Unix AIX 5.1.

I am trying to configure a ruleset and script to add custom text information to the trap by sending a new trap.  The trap is from BMC's Patrol Express generic 6 specific 1.  All traps from Patrol Express use specific 1.  The trap has 8 variables $1 thru $8.  Variable $3 has the hostname, variable $4 has the Application Name, and variable $8 has the severity level (0=Cleared 3=Alarm).  Based on Variable $3 or $4 I would like to generate a new trap that has contact information with it.

For example, if a trap comes in with a particular hostname, I would like to have a new trap displayed which has contact information added to it.  Such as, Contact SQL DBA.

I read through a lot of the postings about this, but still cannot get this to work correctly.

I have done the following.

Created new trap definition for new trap under BMC's Patrol Express enterprise generic 6 specific 99.
Created a ruleset that looks for event attribute 4 = SQL Server Buffer Counters, then it runs an action, /usr/OV/bin/PECustomNotifySQL.ksh

        I have tried /usr/OV/bin/PECustomNotifySQL.ksh "NVATTR_3" "NVATTR_4" "NVATTR_8"
        I have tried /usr/OV/bin/PECustomNotifySQL.ksh NVATTR_3 NVATTR_4 NVATTR_8
        I have tried /usr/OV/bin/PECustomNotifySQL.ksh "NVATTR_3 NVATTR_4 NVATTR_8"
The traps just show up as CONTACT MSSQL DATABASE ON-CALL PERSON NVATTR_3 NVATTR_4 NVATTR_8 with no values.

Here is the script…
# Used to test Patrol Express custom alerts.


/usr/OV/bin/snmptrap $NVHOST $ENTERPRISE $ABOUTHOST 6 $MYTRAPID 1       \
        . OctetString "$ACCOUNTNAME" \
        . OctetString "$SERVICENAME" \
        . OctetString "$ELEMENTNAME" \
        . OctetString "$APPNAME" \
        . OctetString "$APPINSTNAME" \
        . OctetString "$PARAMNAME" \
        . OctetString "$PARAMVALUE" \
        . Integer "$PARAMSTATE" \

I am also receiving errors regarding "Varbind contained an illegal character" in my nvaction.alog.  Are these errors preventing this from working?  This is probably due to the security patches that try to filter special characters, so I created a /usr/OV/bin/netnmrc.pre file and added the following to it to accept these special characters…

        export AdditionalLegalTrapCharacters
However, I am still receiving these errors in nvaction.alog.  I did stop (ovstop nvsecd) and restart netview (netnmrc).

There is mention in some postings of using the sed command to strip out the backslashes, but this has not worked for me either.  I tried adding this to my script...

NODE=`echo "$2" | sed "s:\\\\\\::g"`

Thanks in advance for any help you can provide,

Picture (Metafile)        Charlie Clinkscales
Sr. Network Management Specialist
First American Real Estate Information Services
8435 North Stemmons Freeway
Dallas, Texas 75247-3907
        Email:   cclinkscales@firstam.com
Phone: (214) 678-7250
Fax:     (214) 589-9413

<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web