- Created by Vladimir Stanković on 20 05, 2016
Most devices use the syslog and SNMP protocol to manage system logs, events and alerts. As an example, this section offers a brief guide for setting up Cisco devices logging to NetVizura server. For more detailed information, refer to the Cisco website.
Configuring Cisco Routers for Syslog
Router# configure terminal
- Enters global configuration mode.Router(config)# service timestamps type datetime [msec] [localtime] [show-timezone] -
Instructs the system to timestamp syslog messages.Router(config)# logging host [transport] [udp] [port port-num]
Router(config)# logging trap
level
- Specifies the kind of messages, by severity level, to be sent to the syslog server. The default is informational and lower. Possible values are emergencies: 0, alerts: 1, critical: 2, error: 3, warnings: 4, notifications: 5, informational: 6, debugging: 7.Router(config)# logging facility
facility-type
- Specifies the facility level used by the syslog messages; the default is local7.Router(config)# end
- Returns to privileged EXEC mode.Router(config)# show logging
- displays the addresses and levels associated with the current logging setup, and any other logging statistics.
Example
Router-Netvizura# configure terminal Enter configuration commands, one per line. End with CTRL/Z. Router-Netvizura(config)# logging 192.168.1.50 Router-Netvizura(config)# service timestamps debug datetime localtime show-timezone msec Router-Netvizura(config)# logging facility local7 Router-Netvizura(config)# logging trap notifications Router-Netvizura(config)# end Router-Netvizura# show logging
Configuring Cisco Routers for SNMP Trap
Router# configure terminal -
Enters global configuration mode.Router(config)# snmp-server community snmp_community_string <ro or wr>
- Specifies the read-only or write-read SNMP community string.Router(config)# snmp-server host IP_Address version <1 or
2c> snmp_community_string
- Specifies the IP Address of the device to which the traps have to be sent along with SNMP version and SNMP community string.Router(config)# snmp-server enable traps [notification-type] [notification-option] -
Specifies the SNMP trap types if you do not want to send all traps to server.
Example
Router-Netvizura# configure terminal Enter configuration commands, one per line. End with CTRL/Z. Router-Netvizura(config)# snmp-server community public ro Router-Netvizura(config)# snmp-server host 192.168.1.50 version 2c public
Router-Netvizura(config)# snmp-server enable traps ospf
Router-Netvizura(config)# end
- No labels