Log Analytics with BigQuery and Looker
In today’s data-driven world, leveraging the full potential of your cloud data is essential. This blog delves into the strategic advantage of streaming Google Cloud audit logs into BigQuery and visualising them through Looker Studio. Discover how this powerful combination can unlock deeper insights, fortify security monitoring, and transform raw log data into actionable intelligence that drives smarter, more informed decision-making.
Business Challenges
Proposed Solution
Benefits
Implementation Plan
How could you get the data in?
This is how it could be done. This is just an example and not our full production-ready implementation. Please ensure best practices are considered from a performance, cost and security perspective.
This involves enabling audit logging for the desired services and creating a sink to route logs to BigQuery. You can do this via the Google Cloud Console or using the gcloud command-line tool.
a) Using the gcloud CLI:
# Replace the following: # PROJECT_ID: Your Google Cloud project ID # DATASET_ID: The BigQuery dataset ID to store logs # FILTER: A filter expression to select specific audit logs gcloud logging sinks create audit-log-sink \ bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID \ --log-filter="FILTER"
Example filter expressions:
b) Using the Google Cloud Console:
Once logs are streamed to BigQuery, you can use SQL to query and analyse the data.
Example SQL query:
SELECT timestamp, protoPayload.authenticationInfo.principalEmail, protoPayload.methodName, protoPayload.resourceName FROM
`PROJECT_ID.DATASET_ID.cloudaudit_googleapis_com_ACTIVITY` WHERE protoPayload.methodName LIKE 'google.cloud.bigquery.v2.%' ORDER BY timestamp DESC LIMIT 100;
This query retrieves the timestamp, user email, method name, and resource name for the 100 most recent BigQuery audit logs.
This code and guidance will help you get started with streaming Google Cloud audit logs to BigQuery and visualising them in Looker Studio. Remember to adapt the code and visualisations to your specific needs and use cases.
Recommended by LinkedIn
Looking at Looker?
Looker Studio offers a versatile platform for visualising and analysing Google Cloud audit log data stored in BigQuery. Now you can use Looker Studio's features to build visualisations and dashboards.
We represented the data in the following ways:
Security Monitoring Dashboards:
Operational Efficiency Dashboards:
Compliance and Audit Reporting:
Interactive Data Exploration:
Visualisations:
By leveraging Looker Studio's capabilities, you can transform raw audit log data into actionable insights, improve security posture, optimise operations, and ensure compliance.
Success Measurement
Reduction in security incidents: Track the number and severity of security incidents before and after implementing the solution.
Improved incident response time: Measure the time taken to detect and respond to security incidents.
Increased operational efficiency: Monitor key performance indicators (KPIs) related to resource utilisation and issue resolution.
Enhanced data-driven decision making: Evaluate the impact of data-driven insights on business decisions and outcomes.
Conclusion
Streaming Google Cloud audit logs into BigQuery and visualising the data in Looker Studio offers a powerful solution for enhancing security monitoring, improving operational efficiency, and enabling data-driven decision-making. By implementing this solution, organisations can gain valuable insights from their audit log data and achieve significant business benefits.
Ready to Unlock the Power of Your Audit Log Data? If you're looking to enhance security, improve operational efficiency, and drive data-driven decision-making with Google Cloud audit logs, we’re here to help. Reach out today to discuss how we can design a custom solution that transforms your data into valuable insights.