If you are going to try my shell script, then change the last line to use
$rc
#!/bin/ksh
echo NVATTR_4 > /usr/OV/tmp/varbind4.out
grep <my_test_string> /usr/OV/tmp/varbind4.out
rc=$?
exit $rc
James Shanks
Level 3 Support for Tivoli NetView for UNIX and Windows
Network Availability Management
Network Management - Development
Tivoli Software, IBM Corp
JaneTaylor@HBOSpl
c.com
Sent by: To
nv-l-bounces@list nv-l@lists.ca.ibm.com
s.ca.ibm.com cc
Subject
11/07/2007 05:32 RE: [NV-L] FW: Varbind errors
AM
Please respond to
Tivoli NetView
Discussions
<nv-l@lists.ca.ib
m.com>
Exactly what I need. That makes thing much simpler. I was running a perl
script in an action, parsing NVATTR_4 there and blocking the trap. Then
generating a new trap from the perl script, which feels horribly clunky.
I'll give this a go.
Thanks
Jane
-----Original Message-----
From: nv-l-bounces@lists.ca.ibm.com
[mailto:nv-l-bounces@lists.ca.ibm.com] On Behalf Of James Shanks
Sent: 06 November 2007 16:41
To: Tivoli NetView Discussions
Subject: Re: [NV-L] FW: Varbind errors
Well, as Bill has explained, those backslashes are the result of a
requirement that we escape certain characters when they occur in the
varbinds of a trap. They are not errors, but present a challenge for
you to script around.
But my question to you is more fundamental. You says you want to
generate a new trap based on the old one. Then you say you simply want
to exclude some traps from going to TEC based on the 4th varbind. OK,
but you don't need a new trap for that. And you don't even have to look
at the 3rd varbind with the OID in it.
Since the 4th varbind is text, you will have to know in advance what
strings signal that the trap should be forwarded or not. So I'd echo
the 4th varbind out to a temp file and grep for your test string,
something like this.
#!/bin/ksh
echo NVATTR_4 > /usr/OV/tmp/varbind4.out
grep <my_test_string> /usr/OV/tmp/varbind4.out
rc=$?
exit rc
grep returns a zero when a match is found and a 1 when none so you can
use that as a return code. Your test string will have to be a regular
expression of course. You code the Inline action to continue or not
continue as appropriate.
James Shanks
Level 3 Support for Tivoli NetView for UNIX and Windows Network
Availability Management Network Management - Development Tivoli
Software, IBM Corp
JaneTaylor@HBOSpl
c.com
Sent by:
To
nv-l-bounces@list nv-l@lists.ca.ibm.com
s.ca.ibm.com
cc
Subject
11/06/2007 02:47 [NV-L] FW: Varbind errors
AM
Please respond to
Tivoli NetView
Discussions
<nv-l@lists.ca.ib
m.com>
Can anyone help?
I'm trying to generate new traps after receiving certain traps and then
forward them to our tec server. The reason being, I don't want to send
them all. I'm getting the following errors
2007/05/11 18:23:28 UserExitDnode.C[345] : Varbind contained an
illegal character.
Issuing sanitized version of the varbind:]
2007/05/11 18:23:28 UserExitDnode.C[346] :
NVATTR_3="1\.3\.6\.1\.3\.94
\.1\.8\.1\.2\.33\.0\.0\.96\.223\.34\.84\.182\.0\.0\.0\.0\.0\.0\.0\.0\.12
"
2007/05/11 18:23:28 UserExitDnode.C[345] : Varbind contained an
illegal character.
Issuing sanitized version of the varbind:]
2007/05/11 18:23:28 UserExitDnode.C[346] :
NVATTR_4="BUFFER_RETRIEVAL_REQUEST S_success F_IO Board 11 DD_RAM Buffer
needs to be retrieved\. Either it has reached its threshold or the
periodic retrieval is needed\. This event triggers EM to automatically
retrieve the file\. Board is IO Board 11\."
I'm just trying to forward the same fields from the original trap. The
NVATTR_3 is an ObjectIdentifier and NVATTR_4 is an OctetString. These
are actually the ones
In fact, I just want to drop some of these traps by parsing what's in
the description (NVATTR_4). Is there an easy way of doing that in a
ruleset?
Help greatly appreciated.
Jane
Jane Taylor
Enterprise Monitoring & Automation Service Group Technology Group
Operations - HBOS Plc
(7584) 38733)
01422) 338733)
Copley Ground Floor West Wing
JaneTaylor@HBOSplc.com
COP/CG/GT/OPS/EMAS/JBT/348063
For details of monitoring solutions and statistics....
http://hww.intranet.hx-online.hxgroup.com/intranet/sites/site46.nsf?open
database
Please direct any general queries to our Global Mailbox:
$Enterprise Monitoring & Automation (HO)
.
------------------------------------------------------------------------
--------------------------------------------
HBOS plc, Registered in Scotland No. SC218813. Registered Office: The
Mound, Edinburgh EH1 1YZ. HBOS plc is a holding company, subsidiaries of
which are authorised and regulated by the Financial Services Authority.
========================================================================
======
_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to
internal IBM'ers only)
_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to
internal IBM'ers only)
.
----------------------------------------------------------------------------------------------------------------------
HBOS plc, Registered in Scotland No. SC218813. Registered Office: The
Mound, Edinburgh EH1 1YZ. HBOS plc is a holding company, subsidiaries of
which are authorised and regulated by the Financial Services Authority.
==============================================================================
_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to
internal IBM'ers only)
_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to
internal IBM'ers only)
|