Topics on this page
Monitor scan results in GCP
Do not depend on logs in your downstream workflow. Logs are subject to change without prior notice. Use the GCP Pub/Sub resource instead. If there is any necessary information that only exists in logs, please contact support with a feature request.
You can configure the Scan Result Topic to notify you when a scan occurs. The Scan Result Topic is a GCP Cloud Pub/Sub resource.
Find the scan result topic resource name
Go to the Deployment Manager console in GCP.
Select the storage stack deployment.
Find the Pub/Sub topic resource in the storage stack. The resource name ends with
Create a Pub/Sub subscription to the scan result topic
Go to the Pub/Sub console in GCP.
Select the scan result topic.
Select CREATE SUBSCRIPTION.
Configure the subscription-based on your use scenario.
You can receive scan results from the subscription.
For more information on creating steps in GCP, see Create and use subscriptions
Here is a sample plug-in for creating a GCP Cloud Function to promote or quarantine the scanned files: Post-Scan Action: Promote or Quarantine.
View scan results in scanner logs
File Storage Security logs its scan results in the Scanner function's logs. These logs contain a bit more information than what's available in the fss-* tags.
To view the scan result logs in Scanner logs:
In GCP, go to Cloud Function > your scanner function > LOGS.
Input ”scan result" in the Filter field.
Expand the event message that starts with
scanner result:and reference the scan result format.
Search for scan results in Logs Explorer
You can search for scan results using GCP Logs Explorer. Below is an example of how to set up a query.
In GCP, go to the Logging service.
On the left, select Logs Explorer.
Click the Show query button.
Replace the contents of the text box with the following lines:
Replace SCANNER_FUNCTION_NAME with the scanner function's name. This query finds all scan results.
Set the time or date range using the available buttons.
Select Run query. A list of messages containing scan results appears.
Expand a message to view the scan results. For help on understanding the scan results, see scan result format.