How to translate the eHealth trap log (Legacy KB ID CNC TS25333 )

Document ID : KB000051960
Last Modified Date : 14/02/2018
Show Technical Document Details

The eHealth trap logs are located in the NH_HOME\log directory and are named TrapLog.*.*.bin. These files can be translated to ascii text using the nhTranslateTrapLog command.

nhTranslateTrapLog translates binary, ASCII, or Micromuse Netcool trap log files into a standard form that can be sent to the nhSendSnmpTrap command. It can also be used to translate binary traps to an ASCII format so a user can see what the traps contained. Use this command to evaluate non-certified traps or to rerun traps for testing or certification purposes. Output defaults to -standard format sent to standard out allowing it to be passed to another script.



nhTranslateTrapLog [ -h ]
 { -bin <inputFile> [ -t <pduIdList> ] - -ascii <inputFile> - -netcool <inputFile> }
 [ -standard [<outputFile>] - -ascii [<outputFile>] ]


-h   (Optional) Displays this command usage.

-bin <inputFile>
     Specifies the format of the input file as a binary trap server log file. If you specify -bin, you may also specify -t.

-ascii <inputFile>
     Specifies the format of the input file as a readable and editable text format.

-netcool <inputFile>
     Specifies the format of the input file as a Netcool trapd log.

     (Required) Specifies the path and name of the trap file to translate.

-t  <pduIdList>
     (Optional) Specifies a list of protocol data unit (PDU) IDs or sequence numbers of the traps to be translated. Uncertified traps have an associated PDU ID. For the PDU ID, refer to the browser or tool displaying the trap that you want to translate. The Live Exceptions Browser displays the PDU ID in the Description column. This option is valid when specifying the -bin option.

-ascii [ <outputFile> ]
     (Optional) Specifies a readable and editable text format. If you specify this argument, you cannot specify -ascii input.

-standard [ <outputFile> ]
     (Optional) Specifies a file format that can be used with the nhSendSnmpTrap command. This argument is the default. If you specify this argument, you cannot specify -ascii input.

     (Optional) Overrides standard output with the specified file name. Valid when an output file format type is specified.


This example uses the nhTranslateTrapLog command with the nhSendSnmpTrap command to rerun a log immediately after it has been translated. Use this
syntax to replay traps for certification or testing purposes:


        nhTranslateTrapLog -netcool trapd.log - nhSendSnmpTrap -a -z


To translate a TrapLog.*.*.bin in the $NH_HOME\log directory, use the following command:


        nhTranslateTrapLog -bin TrapLog.*.*.bin -ascii TrapLog.*.*.txt


This will created a text file in the $NH_HOME\log directory that has the trap translations in ascii text.




Related Issues/Questions:
How to translate the eHealth trap log
trap log location
nhTranslateTrapLog command

(Legacy KB ID CNC TS25333 )