Logging

Let's look at the logging feature for Stackdriver. If you recall from the earlier section, we installed the logging agent as part of our Stackdriver account setup. Click on Logging on the side bar tab to open a new window. You can select different resources, which include GCE Project, a GCE Firewall Rule, or even a GCE VM Instance:

Click on Load older logs to review these logs:

You can also filter using the Any log level option, or using the time frame:

Let's select our virtual machine instance and review its logs:

I intentionally stopped the Apache2 web server and noticed these new logs at the bottom:

Let's start the Apache2 web server and see whether the logs reflect this event. Click on the Jump to now button on top of the page to load the latest logs:

Now we'd like the logs to auto-populate. For this to happen, enable Log streaming:

This will auto-populate any new logs created by system events on your machine. One last thing to note is that you can directly view logs from the dashboard charts by clicking the View Logs option:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.68.206