Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

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 http://www.cisco.com/en/US/docs/net_mgmt/ciscoworks_resource_manager_essentials/4.2/user/guide/syslog.html#wp1211314 for the RME 4.2 user guide on how to enable automated actions.

RME_automated_action.GIF

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

You can download a trap generator from http://www.net-snmp.org, 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 1.1.1.1 1.3.6.1.4.1.9.9.41.2 s "OSPF!"

Back to CiscoWorks Resource Manager Essentials

4846
Views
0
Helpful
0
Comments