To: | nv-l@lists.us.ibm.com |
---|---|
Subject: | RE: [nv-l] using SNMP trap to change object attribute |
From: | Leslie Clark <lclark@us.ibm.com> |
Date: | Wed, 26 Jan 2005 18:10:36 -0500 |
Delivery-date: | Wed, 26 Jan 2005 23:11:18 +0000 |
Envelope-to: | nv-l-archive@lists.skills-1st.co.uk |
In-reply-to: | <BB57227729652B4A838F8E40A4DEDB0D08A6E1@HQ-MBX-02.ba.ad.ssa.gov> |
Reply-to: | nv-l@lists.us.ibm.com |
Sender: | owner-nv-l@lists.us.ibm.com |
I do that sort of thing like this: 1) add a field to my custom fields file /usr/OV/fields/C/My.fields Field "My_Trap_Flag" { Type String; Flags locate, general; } Run 'ovw -fields' after messing with a fields file. 2) In trapd.conf, define the traps of interest as having a trap source of 'Y' instead of the usual 'A' or 'u' 3) Make a Netview ruleset that with an Event Attribute cube that checks trap source for 'Y' and invokes an action '<path>/TrapFlag.sh -set $NVA' 4) Make that ruleset run in the background (/usr/OV/conf/ESE.automation) 5) write a little script TrapFlag.sh that uses nvdbimport to set the field 'My_Trap_Flag' to TRUE for the node that the trap is from. 6) On the reports menu (/usr/OV/reports/C) add two scripts to call that script: TrapFlagSet.sh and TrapFlagClear.sh Trap_Flag_Set.sh #!/bin/ksh # Set trap flag to True for the selected nodes. name=$(basename $0) xnmappmon -geometry 680x500 -commandTitle "$name" \ -commandHeading "Setting Trap Flag to TRUE for Selected Nodes " \ -cmd <path>/TrapFlag.sh -set $OVwSelections Trap_Flag_Clear.sh #!/bin/ksh # Set Trap Flag to false for the selected nodes. name=$(basename $0) xnmappmon -geometry 680x500 -commandTitle "$name" \ -commandHeading "Setting Trap Flag to FALSE for Selected Nodes " \ -cmd <path>/TrapFlag.sh -clear $OVwSelections Users can execute those functions against one or more nodes selected on the map. Usually they would only use the clearing one. But the setting one is handy for testing. The job of the TrapFlag.sh script is to generate an import file that looks like this: Selection Name,My_Trap_Flag nodename,TRUE (or FALSE on the clear) and run nvdbimport to set the values for the nodes selected on the map, or indicated by the rule. See the man page for nvdbimport. There are samples in /usr/OV/conf/nvdbtools. Then make your problem smartset include the criteria " || My_Trap_Flag=TRUE The operators will know that green things in the problem smartset are there because of traps. They should look up the events for that node to see what they are. I usually provide another function on that reports menu that does a grep in trapd.log for the selected node. You could do the grep right from the script in /usr/OV/reports/C, but I usually have it all another one in my custom scripts directory. The reason for this is so I can offer the same function to web console users as I do to the Motif users. Cordially, Leslie A. Clark IBM Global Services - Systems Mgmt & Networking (248) 552-4968 Voicemail, Fax, Pager
Jason, I assumed that if we set attribute 'IP Status', then it would get reset the next time NetView polls the device. If we set another attribute, then I assume we will have to reset manually, or use a clearing trap to reset the attribute. Can an attribute be set to clear after a certain period of time? How would you suggest that we do this? Thanks. -- Craig Freter Social Security Administration Mailto:craig.freter@ssa.gov Phone: 410-965-9502 -----Original Message----- From: owner-nv-l@lists.us.ibm.com [mailto:owner-nv-l@lists.us.ibm.com] On Behalf Of Allison, Jason (JALLISON) Sent: Wednesday, January 26, 2005 4:10 PM To: nv-l@lists.tivoli.com Subject: RE: [nv-l] using SNMP trap to change object attribute It can be done (not sure how with smartsets though). The theory being when a BGP trap arrives, set a certain status or set some other attribute. However, when do you toggle the other way? Meaning, after what interval do you want a router to be removed from the smartset? Jason -----Original Message----- From: owner-nv-l@lists.us.ibm.com [mailto:owner-nv-l@lists.us.ibm.com] On Behalf Of Freter, Craig Sent: Wednesday, January 26, 2005 4:02 PM To: 'nv-l@lists.tivoli.com' Subject: [nv-l] using SNMP trap to change object attribute Hello, System information: OS - AIX 5.1 NetView - 7.1.3 FixPack3 We are currently using a Smartset to view Routers that are either down or unreachable. Here is the Smartset rule: (('IP Status'='Critical') || ('IP Status'='Unreachable')) && ('isRouter'=True) Besides "Critical' and 'Unreachable', we would also like this Smartset to display routers that send BGP traps to NetView. Is there any way to have an incoming SNMP trap change the value of 'IP Status', or any other object attribute? Is this the wrong use of a Smartset? Thanks. -- Craig Freter Social Security Administration Mailto:craig.freter@ssa.gov Phone: 410-965-9502 |
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | RE: [nv-l] using SNMP trap to change object attribute, Allison, Jason \(JALLISON\) |
---|---|
Next by Date: | RE: [nv-l] using SNMP trap to change object attribute, James Shanks |
Previous by Thread: | RE: [nv-l] using SNMP trap to change object attribute, Freter, Craig |
Next by Thread: | RE: [nv-l] using SNMP trap to change object attribute, Allison, Jason \(JALLISON\) |
Indexes: | [Date] [Thread] [Top] [All Lists] |
Archive operated by Skills 1st Ltd
See also: The NetView Web