Guy Soleme Absent Member.
Absent Member.
105 views

Generic SNMP Traps question

Jump to solution
Hi,

Does anybody have knowledge of a way to send Generic SNMP traps (like Cold Start and Warm Start), depending on the NODE_NAME or NODE_GROUP or -in general- the SOURCE, to a DIFFERENT Message Group ?

Not taking into account defining for each NODE_NAME all Generic SNMP Traps... This in order to keep it manageable.

Thanks

Guy
0 Likes
1 Solution

Accepted Solutions
Highlighted
Alan Deger Absent Member.
Absent Member.

Re: Generic SNMP Traps question

Jump to solution
I think this is a little bit of a stretch as to what HP intended the Message Grouping to be used for. This would be relatively simple to do via Message Regrouping (Actions->Server->Regrouping) but only if:

1) you only wanted to do this for a few servers or
2) if the servers you wanted to do this for were logically grouped with some distinguishing name component or by IP address.

If any of these were the case you could just include the correct filter criteria (possibly including the $MSG_GEN_NODE or $MSG_GEN_NODE_NAME> variable in the message text and using this to filter for your regroup condition.

Anyone else?

-ard
4 Replies
Highlighted
Alan Deger Absent Member.
Absent Member.

Re: Generic SNMP Traps question

Jump to solution
I think this is a little bit of a stretch as to what HP intended the Message Grouping to be used for. This would be relatively simple to do via Message Regrouping (Actions->Server->Regrouping) but only if:

1) you only wanted to do this for a few servers or
2) if the servers you wanted to do this for were logically grouped with some distinguishing name component or by IP address.

If any of these were the case you could just include the correct filter criteria (possibly including the $MSG_GEN_NODE or $MSG_GEN_NODE_NAME> variable in the message text and using this to filter for your regroup condition.

Anyone else?

-ard
Bill P. Fanelli Absent Member.
Absent Member.

Re: Generic SNMP Traps question

Jump to solution
Guy,

The mechanism is easy. Open the Message Sort Template for SNMP Traps. For each trap you want to change, follow this example. To make the example easy, let's say we will send cold start traps from a node named fred to a new Message Group named FredTraps.

1. In the Message Group Bank, pull down Actions|Message Group|Add and in the window that opens, enter FredTraps. Save.

2. Open a Message Source Templates window. Find the SNMP traps template on your managment server, probably named SNMP-NNM 6. In this template, select the SNMP_Cold_Start condition, and press the Copy button. In the window that opens:
- in the Match Condition section, enter fred as the node
- in the Set Attribute section, enter FredTraps as the Message group.

3. Save this template and distribute templates to the management server. Now any cold start trap from fred will appear in a new Message group called FredTraps.

I said the example would be easy. I did not promise useful. It would be a pain to have to add a separate condition for each server you want to change the Message Group on. To make this useful, I would want to find a rule to identify groups of sources. The identifying data you have to work with is what is in the trap itself: OID and variable bindings. Take a look at the traps that are coming in now under Show Original Message to see if there is a variable you can match on.

An approach I have used to take actions based on information that cannot be derived directly from the trap is to:

- Add an Automatic Action to the event in question, in this case the Cold Start condition under the SNMP Trap template.

- The Action calls a script that determines whether the event needs special processing.

- For special nodes, the script calls opcmsg to send a new message to OV Operations. The new message can be targeted to any Message Group.

A final thought - In my shop, I want to know that the SNMP Template Group has ALL the SNMP traps, even the ones someone has asked for special processing on. To accomplish this, I have copied the entire SNMP Trap template to a new template name SNMP_Detail. Under the SNMP_Detail template, I set the default Message group to SNMPII. I have assigned the SNMPII Message Group to only opc_adm (me). I handle all my special processing requests in the original template. In this configuration, each trap is processed by both templates and produces two messages, one in each Message Group.

HTH (actually, I just hope it makes sense),
Bill F.
Manage by rules, not by lists.
Guy Soleme Absent Member.
Absent Member.

Re: Generic SNMP Traps question

Jump to solution
Alan,

Thanks for the clear answer. But, we're talking about 70 switches, 40 routers and some more other stuff... and they all have nothing on the ipaddresslevel in common.

Thanks
0 Likes
Guy Soleme Absent Member.
Absent Member.

Re: Generic SNMP Traps question

Jump to solution
Bill,

Thanks for the quick and clear answer. I'll keep the automatic action in mind and perhaps proceed in that manner... Although I think that one should go outside the software for this issue... if one could use a node group in the template, I guess that would solve my issue.

Thanks
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.