Upload Jamf Logs - Rocketman-Tech/rcc GitHub Wiki
The Upload Jamf Logs tool supports multiple upload destinations for specified files, such as log files. You can upload these files to:
-
Amazon Web Services (AWS S3) (default, if
--uploadDestination
is omitted) - Google Cloud Storage (GCS)
- Microsoft SharePoint
The tool handles multiple files or directories by automatically compressing them into a single zip file before upload if needed. It also enforces file size limits to prevent oversized uploads.
If you omit --uploadDestination
, the default behavior is to upload to AWS S3.
Use your AWS Access Key and AWS Secret Key in place of --clientId
and --clientSecret
.
Example Command (AWS S3)
rocketman UploadJamfLogs \
--bucketName "your-s3-bucket" \
--awsRegion "us-east-1" \
--clientId "your_aws_access_key" \
--clientSecret "your_aws_secret_key" \
--filePaths /var/log/jamf.log /var/log/rocketman.log \
--uploadName "logs" \
--maxFileSize 50000
To upload logs to a GCS bucket, set --uploadDestination gcs
and use a Service Account JSON file as your --clientSecret
.
Example Command (GCS)
rocketman UploadJamfLogs \
--uploadDestination gcs \
--bucketName "your-gcs-bucket" \
--clientSecret "/path/to/service_account_credentials.json" \
--filePaths /var/log/jamf.log /var/log/rocketman.log \
--uploadName "logs"
To upload logs to SharePoint, set --uploadDestination sharepoint
and specify the SharePoint site URL via --sharepointSiteUrl
. The library or document folder name is specified by --bucketName
.
Example Command (SharePoint)
rocketman UploadJamfLogs \
--uploadDestination sharepoint \
--bucketName "Documents" \
--sharepointSiteUrl "https://<domain>/sites/<site>" \
--clientId "your_client_id" \
--clientSecret "your_client_secret" \
--filePaths /var/log/jamf.log /var/log/rocketman.log \
--uploadName "logs"
Below are the common parameters. Some may only apply to certain upload destinations.
Specifies the target location for uploads. Valid options:
-
gcs
(Google Cloud Storage) -
s3
(AWS S3) - default if omitted -
sharepoint
(Microsoft SharePoint)
Example:
rocketman UploadJamfLogs --uploadDestination s3
- For AWS S3: AWS Access Key.
- For SharePoint: SharePoint App Client ID.
-
Not used for GCS (use
--clientSecret
with Service Account JSON only).
Example:
rocketman UploadJamfLogs --clientId "AWS_ACCESS_KEY"
- For GCS: Path to the Service Account JSON file.
- For AWS S3: AWS Secret Key.
- For SharePoint: SharePoint App Client Secret.
Example:
rocketman UploadJamfLogs --clientSecret "/path/to/service_account.json"
Specifies the name of the zip file that will be created and uploaded. This zip file will contain all files specified by --filePaths
.
- Type: string
-
Example:
rocketman UploadJamfLogs --uploadName "log_backup.zip"
A list of file or directory paths to be uploaded. If multiple files or directories are specified, they are first compressed into a single zip file named according to --uploadName
.
- Type: list of strings
-
Default:
/var/log/jamf.log
if no other path is specified -
Example:
rocketman UploadJamfLogs --filePaths /var/log/jamf.log /var/log/install.log
Specifies the bucket (GCS/AWS) or site documents library (SharePoint) where files will be uploaded.
- For GCS: GCS bucket name
- For AWS S3: S3 bucket name
- For SharePoint: Name of the SharePoint documents library/folder
Example:
rocketman UploadJamfLogs --uploadDestination gcs --bucketName "my-gcs-bucket"
AWS region for S3. Only required if --uploadDestination s3
.
-
Example:
rocketman UploadJamfLogs --uploadDestination s3 --awsRegion "us-east-1"
Full URL for the SharePoint site. Only required if --uploadDestination sharepoint
.
-
Example:
rocketman UploadJamfLogs --uploadDestination sharepoint --sharepointSiteUrl "https://<domain>/sites/<site>"
Defines the maximum allowable file size for the upload in kilobytes (KB). If the generated zip file exceeds this size, the upload will be aborted with an error message.
- Type: integer
- Default: 50000 (approximately 50 MB)
-
Example:
rocketman UploadJamfLogs --maxFileSize 50000
Specifies the domain for local or managed preference settings in plist files. Useful for configuring persistent options.
- Type: string
-
Default:
tech.rocketman.uploadJamfLogs
-
Example:
rocketman UploadJamfLogs --domain "tech.rocketman.uploadJamfLogs"
Runs the command in simulation mode, which processes files and checks parameters but does not upload any files.
- Type: flag
-
Example:
rocketman UploadJamfLogs --simulate