Counting Number of Files Uploaded in SFTP Server
Overview
Tracking the number of files uploaded to an SFTP server can be useful for monitoring activity, detecting anomalies, or generating reports. This guide explains how to count the number of uploaded files over specific time periods using GCP Cloud Logging.
GCP Cloud Logging
Steps to Count Uploaded Files
- Access Cloud Logging:
- Open
Google Cloud Console
>Operations
>Logging
>Logs Explorer
.
- Run a Query to Count Files Uploaded Yesterday:
jsonPayload.message:"upload" AND timestamp >= "2025-02-11T00:00:00Z" AND timestamp < "2025-02-12T00:00:00Z"
- Run a Query to Count Files Uploaded in the Last 7 Days:
jsonPayload.message:"upload" AND timestamp >= "2025-02-05T00:00:00Z"