How to send custom Trap so a user can add their own fields in the trap.
book
Article ID: KB0094535
calendar_today
Updated On:
Products
Versions
TIBCO Hawk SNMP Adapter
-
Not Applicable
-
Description
Description: In the current sendHawkUserTrap method of the SNMP adapter, a user can only specify HawkUserTrap ID and HawkUserTrapText. How to send other strings in a Trap, such as HostName, IP address?
Resolution
The SNMP adapter’s publisher can convert an alert into a trap and publish to the target machine. The trap converted from alert contains fields such as: Agent Name, Alert Severity, IP Address, Agent Severity… Here SNMP is functioning as a console application. If the user would not like to send an alert, refer to the following steps to build a custom SNMP HMA:
1). Build an XML like D:\tibco\hawk\4.9\adapters\snmp\xml\tibhawktraps.xml, and add
<inputParameter name = "yourCustomString" type = "STRING" oid = ".1.3.6.1.4.1.2000.1.1.18.0" help = "This field specifies your own field for this user defined trap."> </inputParameter>
to add a field.
Modify microagent name in:
<microagent
name = "COM.TIBCO.hawk.snmp.yourCustomHMA" display_name = "yourCustomHMA" help = "TIBCO Hawk SNMP Adapter custom microagent hawk-traps.">
2). In tibhawksnmp.cfg, add the XML in step 1 to "-xml_file".
3). Restart the SNMP adapter and you will see the custom SNMP HMA in Microagent List.
Issue/Introduction
How to send custom Trap so a user can add their own fields in the trap.