Cisco Support Community

Converting syslog messages into SNMP Traps

In some cases it might be desirable generating SNMP traps upon receival of specific syslog messages. For example, if you want to notify a fault management application of an event for which only syslog messages are generated.

For example: some IOS devices are able to send out a syslog message when an OSPF adjacency goes down, but not an SNMP trap.

In order to convert this syslog message into an SNMP trap, an automated action needs to be defined in the Syslog Analyzer in RME.

See for the RME 4.2 user guide on how to enable automated actions.


Fig: A sample configuration, for generating traps when OSPF adjacencies go down.

You can download a trap generator from, that you can invoke from a script. A sample script might be the following:

@echo off
set logfile="C:\sys2trap.log"
echo **************************** >>%logfile%
date >>%logfile%
time >>%logfile%
echo Trap sent to %1, message: %2 >>%logfile%
echo **************************** >>%logfile%
snmptrap -v 2c -c public s "OSPF!"