Skip to main content
Google Cloud
Documentation Technology areas
  • AI and ML
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Distributed, hybrid, and multicloud
  • Generative AI
  • Industry solutions
  • Networking
  • Observability and monitoring
  • Security
  • Storage
Cross-product tools
  • Access and resources management
  • Costs and usage management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
  • Migration
Related sites
  • Google Cloud Home
  • Free Trial and Free Tier
  • Architecture Center
  • Blog
  • Contact Sales
  • Google Cloud Developer Center
  • Google Developer Center
  • Google Cloud Marketplace
  • Google Cloud Marketplace Documentation
  • Google Cloud Skills Boost
  • Google Cloud Solution Center
  • Google Cloud Support
  • Google Cloud Tech Youtube Channel
/
  • English
  • Deutsch
  • Español – América Latina
  • Français
  • Indonesia
  • Italiano
  • Português – Brasil
  • 中文 – 简体
  • 日本語
  • 한국어
Console Sign in
  • Google Cloud Observability
Guides Reference Samples Resources
Contact Us Start free
Google Cloud
  • Documentation
    • Guides
    • Reference
    • Samples
    • Resources
  • Technology areas
    • More
  • Cross-product tools
    • More
  • Related sites
    • More
  • Console
  • Contact Us
  • Start free
  • Discover
  • Cloud Logging overview
  • Try it!
    • Quickstart: Logging for Compute Engine VMs
    • Quickstart: Write and query logs with the gcloud CLI
    • Quickstart: Write and query logs using a Python script
  • Learn fundamentals
  • Log entry data model
  • Store log entries
  • Route log entries
  • Query and view log entries
  • Set org and folder defaults
  • Configure default resource settings
  • Configure CMEK for Logging
  • Use custom organization policies
  • Collect and write logs
  • Which should you use: agent or client library?
  • Structured logging
  • Collect logs from VMs and third-party applications
    • Manage logging agents on VMs
    • Ops Agent
      • Ops Agent overview
      • Install the Ops Agent
        • All installation methods
        • Install the Ops Agent during VM creation
        • Install the Ops Agent on a fleet of VMs using agent policies
          • Overview
          • Use agent policies (GA)
          • Use agent policies (beta)
        • Install the Ops Agent on a fleet of VMs using automation tools
        • Install the Ops Agent on individual VMs
      • Manage the Ops Agent
        • Authorize the Ops Agent
        • Configure the Ops Agent
        • Use log rotation for Ops Agent self logs
        • Manage VMs covered the Ops Agent OS policy
      • Collect logs from third-party applications
        • Overview
        • Active Directory Domain Services (AD DS)
        • Aerospike
        • Apache ActiveMQ
        • Apache Cassandra
        • Apache CouchDB
        • Apache Flink
        • Apache Hadoop
        • Apache HBase
        • Apache Kafka
        • Apache Solr
        • Apache Tomcat
        • Apache Web Server (httpd)
        • Apache ZooKeeper
        • Couchbase
        • Elasticsearch
        • Hashicorp Vault
        • Internet Information Services
        • Jetty
        • MariaDB
        • Memcached
        • MongoDB
        • MySQL
        • nginx
        • Oracle Database
        • PostgreSQL
        • RabbitMQ
        • Redis
        • SAP HANA
        • Varnish HTTP Cache
        • WildFly
    • Legacy Logging agent
      • Logging agent overview
      • Install the Logging agent
        • All installation methods
        • Install the Logging agent on a fleet of VMs using agent policies
        • Install the Logging agent on a fleet of VMs using automation tools
        • Install the Logging agent on individual VMs
      • Manage the Logging agent
        • Authorize the Logging agent
        • Configure the Logging agent
        • Default agent logs
  • Collect on-premises and multi-cloud logs
  • Collect Kubernetes Engine logs
  • Write application logs
    • Logging libraries overview
    • C#: Use .NET logging frameworks or the API
    • Java: Use Logback or java.util.logging
    • Go: Use standard logging
    • Node.js: Use Winston and Bunyan
    • PHP: Use PSR-3 logger
    • Python: Use standard logging
    • Ruby: Use the Stackdriver gem
  • Control access
  • Configure a log scope
  • Access control with IAM
  • Use tags to manage access to log buckets
  • Configure field-level access on log buckets
  • Query, analyze, and view logs
  • Logs Explorer: Query and view logs
    • Logs Explorer overview
    • Build queries using the Logging query language
    • Summarize log entries with Gemini assistance
    • Correlate log entries
    • Find log entries with error groups
    • Logging query language
    • Sample queries and examples
      • Sample queries
      • Example: Detect Log4Shell security exploits
  • Log Analytics: Query and analyze logs
    • Query and analyze logs in Log Analytics
    • Chart SQL query results
    • Save and share SQL queries
    • Analytics views
      • About analytics views
      • Create, query, and manage analytics views
    • Sample queries and examples
      • Sample SQL queries
      • Analyze log volume
      • SQL queries for security insights
    • Create alerts or use BigQuery
      • Query a linked BigQuery dataset
      • Monitor your SQL query results with an alerting policy
  • View logs in supported destinations
    • View logs routed to Logging buckets
    • View logs routed to BigQuery
    • View logs routed to Cloud Storage
    • View logs routed to Pub/Sub
  • Visualize, stream, and monitor logs
  • Visualize log severity and error metrics
  • Stream and tail log entries
  • Monitor your logs
    • Monitor your logs overview
    • Create metrics from logs
      • Log-based metrics overview
      • List and chart log-based metrics
      • Bucket-scoped log-based metrics
      • Configure counter metrics
      • Configure distribution metrics
      • Configure labels on log-based metrics
      • Configure notifications for log-based metrics
    • Create alerting policies that monitor logs
      • Configure log-based alerting policies
      • Manage incidents for log-based alerting policies
      • Manage incidents for SQL-based alerting policies
  • Store logs in log buckets
  • Configure log buckets
  • Configure CMEK for log buckets
  • Configure log views on a log bucket
  • Improve query times with custom indexing
  • Route logs to destinations
  • Configure log sinks
    • Route logs to supported destinations
    • Configure log sinks with user-managed service accounts
    • Route logs to third-party destinations
  • Configure sinks for folders and organizations
    • Collate and route organization-level logs to supported destinations
    • Tutorial: Aggregate and store your organization's logs
  • Batch and route logs retroactively
  • Regionalize your logs
  • Cloud Audit Logs
  • Cloud Audit Logs overview
  • Services with audit logs
  • Enable Data Access audit logs
  • Audit logs in depth
    • Understand audit logs
    • Split log entries
    • Best practices
  • Cloud Logging audit logs
  • Google Workspace audit logs
    • Workspace audit logs overview
    • View and manage Workspace audit logs
    • Login Audit samples
  • Audit logs datatypes
    • AuditLog
      • Types
      • AuditLog
      • PolicyType
    • App Engine AuditData
      • Types
      • ApiConfigHandler
      • ApiEndpointHandler
      • AuditData
      • AuthFailAction
      • ErrorCode
      • FileInfo
      • InboundServiceType
      • LoginRequirement
      • RedirectHttpResponseCode
      • RolloutStrategy
      • SecurityLevel
      • ServingStatus
      • ShardBy
    • App Engine AuditData (legacy)
      • Types
      • AuditData
    • BigQuery AuditData
      • Types
      • AuditData
      • LogType
    • IAM AuditData
      • Types
      • AuditData
  • Troubleshoot
  • Troubleshoot collecting and writing logs
    • Troubleshoot the Ops Agent
      • Overview
      • Find troubleshooting information
      • Troubleshoot credentials
      • Troubleshoot installation and start-up
      • Troubleshoot data ingestion
    • Troubleshoot the Logging agent
  • Troubleshoot routing and storage
  • Troubleshoot CMEK and default settings
  • Troubleshoot monitoring logs
    • Troubleshoot log-based alerting policies
    • Troubleshoot log-based metrics
  • Troubleshoot querying and viewing logs
    • Troubleshoot Logs Explorer
    • Troubleshoot Logging query language
    • Troubleshoot Log Analytics
  • Troubleshoot Workspace audit logs
  • Other Google Cloud Observability documentation
  • Google Cloud Observability
  • Cloud Monitoring
  • Error Reporting
  • Cloud Trace
  • Cloud Profiler
  • AI and ML
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Distributed, hybrid, and multicloud
  • Generative AI
  • Industry solutions
  • Networking
  • Observability and monitoring
  • Security
  • Storage
  • Access and resources management
  • Costs and usage management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
  • Migration
  • Google Cloud Home
  • Free Trial and Free Tier
  • Architecture Center
  • Blog
  • Contact Sales
  • Google Cloud Developer Center
  • Google Developer Center
  • Google Cloud Marketplace
  • Google Cloud Marketplace Documentation
  • Google Cloud Skills Boost
  • Google Cloud Solution Center
  • Google Cloud Support
  • Google Cloud Tech Youtube Channel
  • Home
  • Google Cloud Observability
  • Logging
  • Documentation
  • Guides

Route logs to third-party destinations
Stay organized with collections Save and categorize content based on your preferences.

To view your logs in Splunk or on another third-party platform, route your logs to a Pub/Sub topic. For information about how to create a Pub/Sub topic and how to authorize a third-party to subscribe to the topic, see Third-party integration with Pub/Sub.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-04-30 UTC.

  • Why Google

    • Choosing Google Cloud
    • Trust and security
    • Modern Infrastructure Cloud
    • Multicloud
    • Global infrastructure
    • Customers and case studies
    • Analyst reports
    • Whitepapers
  • Products and pricing

    • See all products
    • See all solutions
    • Google Cloud for Startups
    • Google Cloud Marketplace
    • Google Cloud pricing
    • Contact sales
  • Support

    • Google Cloud Community
    • Support
    • Release Notes
    • System status
  • Resources

    • GitHub
    • Getting Started with Google Cloud
    • Google Cloud documentation
    • Code samples
    • Cloud Architecture Center
    • Training and Certification
    • Developer Center
  • Engage

    • Blog
    • Events
    • X (Twitter)
    • Google Cloud on YouTube
    • Google Cloud Tech on YouTube
    • Become a Partner
    • Google Cloud Affiliate Program
    • Press Corner
  • About Google
  • Privacy
  • Site terms
  • Google Cloud terms
  • Manage cookies
  • Our third decade of climate action: join us
  • Sign up for the Google Cloud newsletter Subscribe
  • English
  • Deutsch
  • Español – América Latina
  • Français
  • Indonesia
  • Italiano
  • Português – Brasil
  • 中文 – 简体
  • 日本語
  • 한국어