That fixed it. I changed the ACCOUNTNAME=$1 to ACCOUNTNAME="$NVATTR_1" and did
the same for the rest of the variables. Many thanks James
I am still receiving the backslashes (\) before - and . Is my netview.pre set
correctly? I did make sure to restart netview with netnmrc.
From: email@example.com [mailto:firstname.lastname@example.org] On
Behalf Of James Shanks
Sent: Wednesday, December 28, 2005 2:46 PM
Subject: Re: [nv-l] Ruleset that sends new trap with custom info.
Change your script, and don't pass it anything. That's your biggest issue with
this You don't have to pass NVATTR variables. Those are environment variables
which are set when the script runs.
In other words this should suffice to set the variables, assuming that the trap
which drives this actually has 8 varbinds which are sent along.
You can trace what is being passed to actionsvr in the nvcorrd.alog/blog by
issuing "nvcdebug -d all" before you test. You can turn tracing off again with
"nvcdebug -r". That will show you what is actually being passed to actionsvr.
It should be the name of your script followed by all the varbinds. You don't
have to pass them; nvcorrd does that for you.
If that's not enough to get you out of the woods, you can put "set -x" as the
first executable line of your script and it will trace it's execution to the
The illegal varbind message just means there are non-alphanumeric characters in
one or more varbinds. It won't stop your script from
running. It does mean that the output may not be what you expect. There
may be underscores in place of other characters which are not in the
Level 3 Support for Tivoli NetView for UNIX and Windows Tivoli Software / IBM
Sent by: cc
[nv-l] Ruleset that sends new trap
with custom info.
Please respond to
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
220.127.116.11.4.1.1031 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
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
I have done the following.
Created new trap definition for new trap under BMC's Patrol Express enterprise
18.104.22.168.4.1.1031 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"
I have tried /usr/OV/bin/PECustomNotifySQL.ksh NVATTR_3 NVATTR_4
I have tried /usr/OV/bin/PECustomNotifySQL.ksh "NVATTR_3 NVATTR_4
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 \
.22.214.171.124.4.1.1031.5.1.1.0 OctetString "$ACCOUNTNAME" \
.126.96.36.199.4.1.1031.5.1.2.0 OctetString "$SERVICENAME" \
.188.8.131.52.4.1.1031.5.1.3.0 OctetString "$ELEMENTNAME" \
.184.108.40.206.4.1.1031.5.1.4.0 OctetString "$APPNAME" \
.220.127.116.11.4.1.1031.5.1.5.0 OctetString "$APPINSTNAME" \
.18.104.22.168.4.1.1031.5.1.6.0 OctetString "$PARAMNAME" \
.22.214.171.124.4.1.1031.5.1.7.0 OctetString "$PARAMVALUE" \
.126.96.36.199.4.1.1031.5.1.8.0 Integer "$PARAMSTATE" \
.188.8.131.52.4.1.1031.5.1.9.0 OctetString "CONTACT MSSQL DATABASE ON-CALL
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
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
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: email@example.com
Phone: (214) 678-7250
Fax: (214) 589-9413