The Google Cloud Platform integration enables monitoring of security events from your GCP infrastructure. Events are collected directly via GCP API and centralized in the Wazuh Dashboard for analysis.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/wazuh/wazuh-dashboard-plugins/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The GCP integration collects security events from various Google Cloud services including Cloud Logging, Compute Engine, Cloud Storage, and more. All events are tagged withwazuh.integration.name: gcp for filtering and analysis.
Reference: plugins/main/common/wazuh-modules.ts:90
Supported GCP Services
The integration monitors events from:- Cloud Logging (formerly Stackdriver) - Centralized logging service
- Compute Engine - Virtual machine instances
- Cloud Storage - Object storage events
- Cloud DNS - DNS query and response logs
- Cloud SQL - Database instance activities
- Cloud Load Balancing - Load balancer logs
- VPC Flow Logs - Network traffic monitoring
- Cloud Audit Logs - Administrative activity logs
- Security Command Center - Security findings
- Cloud IAM - Identity and access management
Key Features
- Real-time event collection via GCP API
- Multi-project monitoring support
- Multi-region event aggregation
- Pub/Sub-based event streaming
- Automatic log parsing and enrichment
- Pre-built dashboards and visualizations
Data Source Configuration
The GCP data source uses the following configuration:plugins/main/public/components/common/data-source/pattern/events/google-cloud/google-cloud-data-source.ts:5
Event Fields
GCP events include the following key fields:data.gcp.jsonPayload.authAnswer- DNS authentication responsedata.gcp.jsonPayload.vmInstanceName- VM instance namedata.gcp.jsonPayload.vmInstanceId- VM instance identifierdata.gcp.jsonPayload.responseCode- HTTP response codedata.gcp.jsonPayload.queryName- DNS query namedata.gcp.resource.labels.project_id- GCP project IDdata.gcp.resource.type- Resource typedata.gcp.resource.labels.location- Resource location/regiondata.gcp.resource.labels.source_type- Event source type
plugins/main/public/components/overview/google-cloud/dashboards/dashboard_panels.ts:112plugins/main/common/dashboards/dashboard-definitions/overview/google-cloud/vis-states.ts:102
Setup and Configuration
Prerequisites
- Google Cloud Platform account
- GCP project with appropriate APIs enabled
- Wazuh manager with GCP module enabled
- Service account with required permissions
- Pub/Sub topic for log streaming (recommended)
Configuration Steps
-
Create Service Account
- Navigate to IAM & Admin > Service Accounts
- Create a new service account for Wazuh
- Grant appropriate permissions
- Download JSON key file
-
Enable Required APIs
-
Configure Required Permissions
Assign these roles to the service account:
roles/logging.viewer- View logsroles/pubsub.subscriber- Subscribe to Pub/Sub topicsroles/storage.objectViewer- View Cloud Storage objects (if needed)
-
Set Up Pub/Sub (Recommended)
-
Configure Wazuh Manager
Edit
/var/ossec/etc/ossec.conf: -
Verify Configuration
- Restart Wazuh manager
- Check logs at
/var/ossec/logs/ossec.log - Verify events appear in dashboard
Dashboard Visualizations
The GCP integration includes comprehensive visualizations:Overview Dashboard
- Events Over Time by Auth Answer - Timeline showing DNS authentication results
- Top VM Instances - Most active virtual machine instances
- Response Codes Distribution - HTTP response code breakdown
- Top Projects - Events by GCP project
- Resource Types - Distribution across GCP resource types
- Geographic Distribution - Events by location/region
- DNS Query Analysis - Most frequent DNS queries
plugins/main/public/components/overview/google-cloud/dashboards/dashboard_panels.ts:4plugins/main/common/dashboards/dashboard-definitions/overview/google-cloud/vis-states.ts:184
Filtering Events
Filter GCP events using:- By project:
data.gcp.resource.labels.project_id: "my-project" - By resource type:
data.gcp.resource.type: "gce_instance" - By location:
data.gcp.resource.labels.location: "us-central1" - By VM instance:
data.gcp.jsonPayload.vmInstanceName: "instance-1"
Use Cases
Cloud Security Monitoring
- Track unauthorized access attempts
- Monitor VM instance lifecycle events
- Detect suspicious API calls
- Identify unusual network patterns
- Track service account activities
Compliance and Auditing
- Administrative activity tracking
- Data access logging
- Configuration change monitoring
- Resource creation and deletion audit
- User authentication verification
Infrastructure Monitoring
- VM instance performance tracking
- Network traffic analysis
- DNS query monitoring
- Load balancer health checks
- Storage access patterns
Threat Detection
- Anomalous authentication attempts
- Privilege escalation detection
- Data exfiltration indicators
- Malicious DNS queries
- Cryptocurrency mining detection
Event Analysis
DNS Security Events
Analyze DNS-related security events:- Monitor DNS query patterns via
data.gcp.jsonPayload.queryName - Track authentication responses via
data.gcp.jsonPayload.authAnswer - Identify potential DNS tunneling
- Detect domain generation algorithms (DGA)
VM Instance Security
Monitor virtual machine security:- Track instance creation and deletion
- Monitor SSH access attempts
- Identify unauthorized instance modifications
- Detect compromised instances
Network Security
Analyze network traffic:- VPC Flow Logs analysis
- Load balancer traffic patterns
- Firewall rule violations
- DDoS attack detection
Troubleshooting
No Events Appearing
- Verify service account credentials are valid
- Check JSON key file path is correct
- Ensure required APIs are enabled
- Verify Pub/Sub subscription exists
- Check IAM permissions are sufficient
- Review Wazuh logs for errors
Missing Events from Specific Services
- Confirm logging is enabled for the service
- Verify log sink is configured correctly
- Check log filters in GCP Console
- Ensure Pub/Sub topic receives messages
Subscription Issues
- Verify subscription is not paused
- Check message retention settings
- Monitor subscription backlog
- Adjust acknowledgment deadline if needed
Performance Optimization
- Adjust polling intervals
- Configure log filtering at source
- Use message batching
- Optimize Pub/Sub settings
- Scale Wazuh manager resources
Security Best Practices
- Use Service Accounts - Dedicated service accounts for integration
- Principle of Least Privilege - Grant minimum required permissions
- Rotate Keys - Regular service account key rotation
- Enable Audit Logging - Monitor integration activities
- Secure Credentials - Store JSON keys securely
- Use VPC Service Controls - Restrict API access
- Monitor Costs - Track Pub/Sub and API usage