Unable to observe CLAMAV antivirus logs at Log Explorer in GCP

43 Views Asked by At

We are using Clamav anti virus at GCP Compute Instances.

It is required to persist the antivirus scan logs for 365 days as per compliance.

Though log archiving is already present at our GCP logs, but I am unable to find any log generate by clamav or clamscan

I have also tried manually running the clamscan, but still do not observe the logs at GCP's Log Explorer

If possible please help me with below queries

  1. How to view clamav/clamscan logs at GCP Log Explorer ?

  2. If any other better approach for persisting clamscan/clamav logs, then please guide.


Manual Running clamscan

enter image description here

No observation at log explorer enter image description here

1

There are 1 best solutions below

3
iamwillbin On

To configuring ClamAV to Generate Logs in GCP:

You need to specify the log file. When running clamscan, specify a log file using the -l option to direct the output to a log file.

clamscan -l /path/to/clamav.log.

Then verify that the log file location is accessible and monitored by GCP's Logging service to capture ClamAV logs.

Manually run clamscan with the specified log file option to trigger ClamAV scans and generate logs that can be monitored. Navigate to GCP's Log Explorer interface to search for and view logs generated by ClamAV.