 Part of your job when you are doing any type of DevOps work is of course making sure all the logs are good and analyzing them, but especially when you're setting something up and troubleshooting them, being able to parse logs is highly important and you want to make that job as easy as possible and contextually relevant as possible with different tools. And for the people who are absolutely great and no-set and often have it in the back of their head where they can just write reg x from the command line and write this that's awesome for a lot of other people like myself and as much as I do write a lot of utilities I still love when something self-contained and easy and that's where log file navigator comes in log file navigator is an Advanced log file viewer for the smaller scale. I kind of like that as a tagline This is a really well-written tiny little program and I say tiny but that does not mean tiny in features No server. No setup still featureful. So what we have here is it runs in your terminal As an excellent presentation, it's open source. So you can have all the code which huge feature there It is supported across the Red Hat platforms and your WN platforms But you can have the source code so you can roll it to whatever platform you want The latest 844 release does have Mac as well in here So it's cross-compiled across the different platforms and of course you have the source code You can do it for those wondering about BSD though. They appear to stop rolling a BSD version after point eight one I don't know why I'm not much of a BSD person other than PF sense and free NAS And so you can't run this natively on those other than the older version I generally pull the log file somewhere else to a Linux machine for analysis anyways So enough on that topic feature wise. This is where this thing's crazy Single log view automatic log format detection. This is the really nice feature so with a lot of utilities you have to specify the log format in order to Have it understand the logs. Well, this is where This is really nice. It understands lots of different logs including generic logs that starts with a time stamp It is smart enough to just figure a lot of these out Which is wonderful and of course you can specify parameters and do more details Other thing that's nice G zip and B zip so as the logs rotate and you have them zipped or compressed You can uncompress them Yeah on the fly without running any extra commands You can just point it at a log file and it goes Hey, this is compressed and without passing in our parameter to open it up lots of filtering options It also will do many log files at once And what that is really helpful for is when you were putting a bunch of log files together because you know Different services are interacting with each other and creating different logs putting a timeline view together based on time So you can say alright Apache did this PHP did this and it query the sequel while having all those log files Put together in one you can watch the timeline and follow something through You can use regular regular expressions to search it But this is where it goes off the rails in my opinion like this is an amazing feature query logs using sequel language they actually built in Query language with sequel so if you're good at sequel, which I'm not great at you can do things like select IP count bites as total from access log group by order Yes, you can put in and looking at logs right from one basic utility here run that so enough talking about it Let's actually talk about the whole What it looks like in action. I have a blog here a last update right now is from August of 2018 I guess it depends on how much time developer has so even though the release is a few months old It's amazing them on a features are packed into this. All right, so here's my Debian machine that I have just a basic VM loaded an apt-get install LNAV works fine for Debian if you're in the Red Hat word, I think it's young install LNAV But it's it's like I said, it's in most repositories or you can download it's just a single executable So there's not a lot going on to it as far as like just not you don't have to install a whole package That's why it says it doesn't need much setup. And we're just gonna go LNAV We're just gonna dump it right here to the var log directory And it starts parsing the log break right away because I found all these logs I'm gonna start putting them together kernel log system D log and Now I'm have all this data and it's doing this all in real time. So as things are happening on this server It's going to update this in real time as it goes And if I want to do things like hit slash and look for something like when my logged in Let's find all the log entries for this IP address and to lazy to type it so copy and paste And then I can just I'm using n and shift and to jump around and you can see it's highlighting My IP address from logging into this so you can see everything that this IP did there Let's quit it is open it again And you notice it's still highlighted it remembers some of the last thing So if you're jumping in and out of the log system you go, oh man I forgot to you know save what I was querying on there It's easy enough to just open it back up and it remembers the last thing you were working on So it's really kind of cool and if you just hit slash again with nothing it clears it So I don't have to have that highlighted So that's kind of the simple of how it works. Let's talk about the more complicated so if we go over here to var log and Let's look at the kernel log, but we want to look at the older one or one of the older message log So we can actually just type l nav slash Burn whoops, I'm not slash cuz it's in the same directory turn log dot three dot gz Didn't have to tell it to decompress it and this is from October of 2017 log no telling it anything just passed along like a go ahead and open this and I can look at the kernel messages from that particular log file and Done it's like I said, it's very convenient to do that and Works really really well and like I said, these are happening in real time So once you open it, you don't have to like refresh it or anything it keeps doing that Well, let's go over here and show you what looks like when you download as a static binary So this is that's it. It's got a news in a readme file Which of course are just part of the download when you download the statically link binary download version point eight four I have it on our Zen server. So this is XCPNG and XCPNG, you know has a lot of logs It's doing all the things that need to be done for the virtualization And if you notice in the first page it does support even VM where it understands how to parse a lot of different log types What we're gonna do now is we're gonna take L now run it locally in this directory and point it at these and source log then source log is the log created for The Zen source as in as everything that's going on with the machine as it's updating the VMs as it's Doing its updates and things like that. So we're watching real-time my Zen server and what it's doing We can also do things like this. So we have a queer Zen server check sense state of this I'm gonna highlight this particular thing right here copy slash Paste and that's the UUID of a particular VM and then I can quickly trace if I'm having a problem going All right, and you see everywhere that VM is that now if I was good at sequel I could even create a query really quickly with that VM and say show me a count of how many times this particular event happened But in general, I use it mostly for some troubleshooting When I'm looking at things put a couple logs together so I can see a timeline and Right away jump in there. So this and then next next next to go through there And a lot of times like said I move this over to one of my other screens while I'm running a utility So as I run it make changes I go, okay, I want to watch what's happening on the log side At least this is just a wonderful tool for doing that. It works really well Now a couple other things it does and we're gonna go over here to my discourse server and show you what it looks like When you're looking at things a bit more in real time on a blur all the p addresses related to this I'm logged into the discourse server. And so this is the thing. I'll show you right here This is where the location of the engine access logs are if I want to review previous ones I could easily go through and like I said pointed at one of the previous ones But I want to show you the real time what it looks like accessing our forums so I go here and You're watching real-time people hit the forums so as they go through I'm blurring out all the IP addresses in case you're wondering What the blurry spot is as we don't I don't need to share anyone's IP address on here I don't know if that's a violation or not, but it's public but anyways So I'm blurring out the IP addresses, but you can see as I click through the forums the Data flowing right now. Like I said, this was really handy whenever I'm setting up anything and this forums in particular Elnav was a easy tool for me to watch when I was sorting out the mail server issues and some of those problems I had at the very beginning when I was installing this each time you set things up There's always little things you have to tweak and being able just to have the messages rolling by in real time And being able to set filters on them makes it that much easier to get the job done So you're like, oh, I see when I did this this is the error that Occurred from that so you can start troubleshooting it and reversing it This also by the way supports mouse So I pressed F2 to make sure mouse is enabled and I'm just scrolling with my mouse up and down Which like I said, I love terminal But it's also nice to have some of those things like a mouse interaction to be able to jump two things be able to search The things but like I said, this is a great utility. I've been using it for a little while It's one of my just simple easy ways that I go through and Find things or when I'm parsing logs and troubleshooting things, it's great It also because of the correlation you can create by consolidating several logs together across different services Makes it so much quicker to say, all right, these things are what's causing this problem But if you want to check it out just apt-get Install or yum install depending on the disk you have your choice or compile it yourself or download the static binaries Because you want to use it on your Xcp engine server and you want to watch what's going on on that it's pretty straightforward and easy to do It's a great utility. Check it out. I'll leave links below where you can get it from Thanks for watching if you enjoyed this video Go ahead and hit the thumbs up if you want to see more content from my channel Go ahead and hit subscribe and the bell icon and hopefully YouTube will send you a notice If you're interested in contracting launch systems for any type of IT services work or consulting work Go ahead and head over to Lawrence systems calm and fill out our contact and get in touch with us If you would like to help the channel out in other ways You can use our affiliate links below in the description or we have a link directly to our launch systems page We have a list of different affiliate offers and it's very appreciated if you use any of those for signing up any of the services And many of them offer you discounts if you want to head over to our forums There'll be a link in the description for our forums Wherever they may be because we've been looking at different forum platforms But they'll always be relevantly linked right there. All right Once again, thanks leave some feedback and comments below on this video if you loved it if you hated it I try to reply to everyone the people who hate and the people who love them So thank you very much and see you next time