Monday, June 3, 2024

Cisco 126 - Syslog

R1(config)#logging console <severity>
^ Sets the level at which messages will be displayed, from <severity> up to and including 0.  So, by specifying "6" (Informational), levels 0 through 6 will be displayed on the console.
Enabled by default at level 7.

Level = Keyword
0 = Emergency
1 = Alert
2 = Critical
3 = Error
4 = Warning
5 = Notice
6 = Informational
7 = Debugging

Mnemonic aid:
Every Awesome Cisco Enginer Will Need Ice cream Daily

R1(config)#logging monitor <severity>
^ Displays syslog messages on ssh/telnet

R1(config)#logging buffered [size] <severity>
^ Stores syslog messages in buffer (memory).  Size = buffer size in bytes.  Bigger number = bigger log but takes away space from operating memory.

R1(config)#logging <server-ip>
R1(config)#logging host <server-ip>
^ These two commands are the same.  Configures device to send syslog messages to external central server which can collect logs from multiple devices for later analysis.

R1(config)#logging trap <severity>
^ Sets the level that will be sent to the external server.

R1(config)#terminal monitor
^ Syslog messages won't be displayed via Telnet/SSH unless you tell them to with this command.

R1(config)#logging synchronous
^ Displays syslog messages on their own line, not in the middle of my console entries.

R1(config)#service timestamps [datetime | uptime]
^ Controls whether syslog entries are displayed with date and time vs. system uptime.

R1(config)#service timestamps log datetime
R1(config)#service sequence-numbers
^ These two commands tell the device to display both date and sequence number in syslog messages.



[These are my notes from Jeremy's excellent CCNA course which can be viewed here.]