In this video, you and I get the opportunity
to take a look at several options regarding logging,
how we can verify what they are, and also
become aware of the additional options or tweaks
that we can inject if we need to get more information
from those log messages.
And for this discussion, I'd like to demonstrate this
on router, any router will do.
We'll use router 1.
We'll do a show logging.
That's a great start.
And show logging is going to show us a lot of good output,
including what the defaults are.
And what this is telling us is that we
are logging to the console, which is we can think
of that like line console 0, and we WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
of that like line console 0, and we
are logging at level debugging.
So there are 8 levels regarding log messages,
and they go from--
I'm going to start with the most busy
and the most detailed and most verbose information, 7,
and then it goes down 6, 5, 4, 3, 2, 1 0.
So 7 would give us everything at that level
and numerically lower, though if we
said we want to do it at level 7, which is debugging--
we'll take a closer look at those numbers
and labels in a moment.
But if we said debugging, that means
anything that happens at a level 6, 5, 4, 3, 2-- WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
anything that happens at a level 6, 5, 4, 3, 2--
anything lower numerically is also included in that.
Think of it like an umbrella that says,
hey, I'm catching everything at this level and everything
numerically lower as well.
So by default, console logging at level 7 is on.
Also monitor logging, so what does that mean?
Well, if somebody's ssh-ed or on a vty line connecting
to this box, that's what that's referring to.
So we kind of think of monitor logging like line vty 0
through whatever the high range is for your vty lines. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
through whatever the high range is for your vty lines.
And so this is willing to send debugging of level
7 messages and below to vty lines.
Now, the trick is--
this happens to a lot of people when they're first
getting involved in Cisco.
They'll remotely connect to a device on a vty line,
and they won't see the log messages,
and they'll say, why am I not seeing the log messages?
The answer is when we connect on a vty line,
this has to be willing to send us
the messages at, in this case, level 7
and below, and the customer needs
to type in terminal monitor, which means WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to type in terminal monitor, which means
I would like to see those.
Though I can't tell you how times
I've been remotely connected and I'm like,
where's my log message?
Well, the user needs to--
either through automation, through their app,
or manually-- type terminal monitor,
so they can see those messages coming to the vty lines.
Then we have the buffer logging, and buffer logging
is everything down here, where it's
stored in memory on this device, and you can also
set the size of that.
So our options include we could enable or disable these.
We could specify certain levels, like we WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We could specify certain levels, like we
could say for buffer logging, we can set the level to a level 3,
and if we did that, it would include everything
at 3 and below.
We wouldn't get the little 4, 5, 6, or 7 leave messages.
We could also include a destination
of a syslog server, which is very, very good thing to do.
We can specify a syslog server and what level of messages
via the trap command we want to send to that syslog server,
and that way, you can store messages
from multiple devices in one central repository as well.
The other option I would like to chat with you about regarding WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
The other option I would like to chat with you about regarding
syslog messages is this.
Let's go ahead and type in config t, then type in exit.
And what it did, it just generated this log message.
Now, this log message is totally configurable.
In the labs, what I normally do is I tweak it way down.
It's not including timestamps, date stamps, milliseconds,
a lot of details that could be there.
So if we're doing troubleshooting
and we want to see sequence numbers and the milliseconds
and the year and the time zone, we
can include all that regarding log messages WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
can include all that regarding log messages
and debug messages, and we can use that
with these service timestamps command, which
we'll have an opportunity do in the next video and lab.
So those are some of the defaults and options
that we have regarding where we're going to, first of all,
send logs, at what level, and what detail
do we want to include in them.
So with that in mind, in the next video and lab,
here's what you and I get to do.
What we're going to do is we are going
to configure custom logging levels for certain destinations
and then verify that they're working out.
I also want to walk you through with the service timestamps
command, tweaking the log messages, so
that when you need that detailed information, you can get it. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
that when you need that detailed information, you can get it.
We'll do all that in the next video.
Meanwhile, I hope this has been informative for you,
and I'd like to thank you for viewing.