Syslog
Cheat sheet · https://pcornel.dk/topic.php?topic=666
Answer
Cisco logging records messages locally and can forward syslog events with facility, severity and trustworthy timestamps.
Remember
- Severity numbers run 0 most severe through 7 debugging
- A configured threshold includes that severity and more severe messages
- Console, buffer, terminal monitor and remote logging are distinct destinations
- Excessive debugging can harm a production control plane; use bounded capture and rollback.
First checks
show logging— console/monitor/buffer/trap levels, syslog hosts and messages logged.show running-config | include logging|timestamps— hosts, levels, source interface, timestamp format.show clock detail— clock and time source.send log <text>— send a test message.- On the server: the message arrives with the correct time and host.
Commands
show logging- Logging configuration, buffer and recent messages.
logging host <ip>- Send syslog messages to a remote syslog server.
logging trap <level>- Set the maximum severity level sent to remote syslog servers.
logging buffered <size>- Store syslog messages in a local memory buffer of the given size.
logging console <level>- Set the severity of messages shown on the console.
logging source-interface <interface>- Use a fixed source interface (often a loopback) for syslog packets.
service timestamps log datetime msec- Add date, time and milliseconds to log messages.
Verify in this order
event generated → severity at or above the configured level → timestamped from NTP time → written to the buffer → sent to the syslog server (UDP 514) from the source interface
Where it usually breaks
local configuration → reachability/transport → request/negotiation → server or policy decision → response/state installation → client-visible result
Syslog · operational reference
| Logging boundary | Healthy reference |
|---|---|
| Producer | Subsystem emits expected message/ID |
| Local policy | Severity threshold admits event |
| Transport | Collector path/source interface works |
| Collector | Message ingested with correct device/time |
| Retention/query | Event remains searchable for required period |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=666