Knowledge Base

Find answers to common questions about Cloudmersive products and services.



Cloudmersive Storage Protect Integration with Azure Log Analytics
6/10/2022 - Cloudmersive Support


When Cloudmersive Storage Protect logs are sent to Azure Log Analytics, it will be sent to the given Workspace specified in the connection. The LogType is specified in the conection as well and defaults to ApplicationLog. The log message is a JSON payload with the following schema.

The log entry itself will at a minimum have these fields: id, datetime, and message with JSON of type StorageProtectScanResult:

        private class StorageProtectScanResult
        {

            public string Azure_ContainerName;

            public string FileName;

            public CloudStorageVirusScanResult ScanResult;

            public StorageItemMetadata StorageItemMetadata;
        }

        /// <summary>
        /// Result of running a virus scan on cloud storage
        /// </summary>
        public class CloudStorageVirusScanResult
        {
            /// <summary>
            /// True if the operation of retrieving the file, and scanning it were successfully completed, false if the file could not be downloaded from cloud storage, or if the file could not be scanned.  Note that successful completion does not mean the file is clean; for the output of the virus scanning operation itself, use the CleanResult and FoundViruses parameters.
            /// </summary>
            public bool Successful { get; set; }

            /// <summary>
            /// True if the scan contained no viruses, false otherwise
            /// </summary>
            public bool CleanResult { get; set; }

            /// <summary>
            /// Array of viruses found, if any
            /// </summary>
            public CloudStorageVirusFound[] FoundViruses { get; set; }

            /// <summary>
            /// Detailed error message if the operation was not successful
            /// </summary>
            public string ErrorDetailedDescription { get; set; }

            /// <summary>
            /// Size in bytes of the file that was retrieved and scanned
            /// </summary>
            public long FileSize { get; set; }

            /// <summary>
            /// Set to true when using NSFW Content Moderation in the Cloudmersive Storage Protect product (disabled by default)
            /// </summary>
            public bool ContainsContentModerationRejection { get; set; }
        }

/// <summary>
        /// Virus positively identified
        /// </summary>
        public class CloudStorageVirusFound
        {
            /// <summary>
            /// Name of the file containing the virus
            /// </summary>
            public string FileName { get; set; }

            /// <summary>
            /// Name of the virus that was found
            /// </summary>
            public string VirusName { get; set; }
        }

public class StorageItemMetadata
        {
            public List<StorageItemTag> Tags;
        }

        public class StorageItemTag
        {
            public string TagKey;
            public string TagValue;
        }

800 free API calls/month, with no expiration

Get started now! or Sign in with Google

Questions? We'll be your guide.

Contact Sales