Overview:

ARTIFACTORY: How to get the download history of a given package from the logs

AuthorFullName__c
Vaibhav Jain
articleNumber
000005649
ft:sourceType
Salesforce
FirstPublishedDate
2023-03-28T14:23:53Z
lastModifiedDate
2023-03-28
VersionNumber
1
To obtain the download history of a specific package from Artifactory, the JFrog Platform provides standardized logs for all its products and services. These logs have a standard format and naming convention, and the corresponding active log files for each JFrog service are located in the "$JFROG_HOME/<product>/var/log" directory.

To fetch the download history of a particular package that has been downloaded by users from Artifactory, you need to parse through the artifactory-request.log file, which contains all the information related to the requests reaching Artifactory. To obtain the package's download history, you can perform a grep of the package name along with grep on the GET request in the request.log file located under "$JFROG_HOME/artifactory/var/log".

To execute the command and fetch the download history of a package, you need to use the following command:
cat artifactory-request.log | <package-name> | grep GET

For example:
cat artifactory-request.log | grep multi1-3.7-20230321.165450-1.jar | grep GET

The above command will produce output similar to the following: