Thursday, January 7, 2021

You can now "tail -f" in Google Cloud Logging

Use the "tail -f" command while monitoring logs? You can now use it in Google Cloud Logging
Source: Google Cloud Blog

Google just announced a new and excellent feature in its Google Cloud Logging service: the ability to run commands similar to tail -f against your cloud logs.

What's tail -f?

Tail is a popular *nix tool used to display the tail end of a text file or piped data. The -f option is a frequent utilized tool used on Linux servers where sysadmins can monitor files as they are updated.

About Cloud Logging

Cloud Logging aggregates logs from across Google Cloud, on-premises or other clouds, indexing, aggregating logs into metrics, scanning for unique errors with Error Reporting and making logs available for search.

What's new?

Google added a new tool to mimic the behavior of the tail -f command, making it possible to display the contents of a log file to the console in real time. You can even use the logging query language's features (like global search, regular expressions, substring matches, etc) in your queries in real-time.

Using Google Cloud Logging Tail

Tailing logs with gcloud is now available to all users in Preview. Those willing to try out the new feature can test it out with a command similar to:

gcloud alpha logging tail "severity>=ERROR"

Running the likes of the above command looks like:

Source: Google Cloud Blog

Tailing in Google Cloud Console

Google Cloud Console also got nice updates. It's now possible to stream, explore, traces, visualize counts and download logs logs to Logs Explorer:

Source: Google Cloud Blog

Source

See Also

Featured Article

Detect, diagnose, and prevent performance problems using Cloud SQL Insights

Cloud SQL Insights, a database observability tool for your Cloud SQL database has just arrived in GCP ...

Popular this Week