I made a big step. In the User guide for SIM, in chapter "Compiling and customizing MIBs" i found the following:
"The mcompile tool verifies the syntax of all MIBs to be loaded into the system. mcompile resolves
all MIB dependencies and, where necessary, converts SNMP v2/v3 MIBs into v1 format for loading
into the HP SIM database". Ah, mcompile converts my SMNPv2 MIB into a SNMPv1. Now i understand why SIM always was talking of Generic Trap ID and Specific Trap ID. My agents sends v2 packets, which don't know generic and specific trap id, this is related only to v1. But SIM imports a v1 mib (after compiling), so it's difficult that the traps and SIM map.
I investigated further the SQL statements which occur when importing the cfg and when the traps arrive. And i found a small, but important difference:
This is the statement when importing the cfg file with mxmib:
INSERT INTO trapItems (trap_id, trap_name, trap_enterprise, trap_generic_id, trap_specific_id, trap_severity_id, trap_varbind_count, cat_id, sev_vb) VALUES (5359,'pacemakerNotificationTrap','1.3.6.1.4.1.32723.2',6,1,100,9,1,0).
The OID is entered as ==> 1.3.6.1.4.1.32723.2 <== for the traps from pacemaker.
But when the traps arrive SIM looks for:
SELECT trapItems.trap_id, RTRIM(trap_name), enabled_flag, trapItems.sev_vb FROM trapItems,trapItemsEx WHERE trapItems.trap_id = trapItemsEx.trap_id AND trap_generic_id = '6' AND trap_enterprise = '1.3.6.1.4.1.32723' AND trap_specific_id = '1'.
This can never match: Entering 1.3.6.1.4.1.32723.2 as trap_enterprise, but looking for ==> 1.3.6.1.4.1.32723 <==.
I made some sligth changes to the PCMK-MIB.cfg file:
vm63422-1:/opt/mx/mibs # diff PCMK-MIB.cfg.orig PCMK-MIB.cfg
227,228c227,228
< ENTERPRISE pacemakerTrap
< VARIABLES { pacemakerNotificationNode, pacemakerNotificationResource, pacemakerNotificationOperation, pacemakerNotificationDescription, pacemakerNotificationStatus, pacemakerNotificationReturnCode, pacemakerNotificationTargetReturnCode, pacemakerNotificationAttributeName, pacemakerNotificationAttributeValue }
---
> ENTERPRISE pacemaker
> VARIABLES { pacemakerNotificationResource, pacemakerNotificationNode, pacemakerNotificationOperation, pacemakerNotificationDescription, pacemakerNotificationReturnCode, pacemakerNotificationTargetReturnCode, pacemakerNotificationStatus, pacemakerNotificationAttributeName, pacemakerNotificationAttributeValue }
229a230,232
> --#SEVERITY MINOR
> --#CATEGORY Pacemaker
> --#MSG_FORMATTER "$V1V#Resource: # $V2V#Node: # $V3V#Operation: # $V4V#Description: # $V5V#Returncode: # $V6V#TargetReturncode: # $V7V#Status: # $V8V#AttributName: # $V9V#AttributeValue: #"
The change in ENTERPRISE is necessary so that the OID (trap_enterprise) is entered in the db as 1.3.6.1.4.1.32723, so that it matches with the trap recognition.
SEVERITY and CATEGORY help that the traps are directly configured as i want.
And MSG_FORMATTER is helpful that an e-Mail which is related to this event is a bit more informative.
Hopefully this helps someone when stumbling across the same problem.
Bernd