API (self-hosted on AWS): Logs
attachmentAV API stores logs in a centralized location using CloudWatch Logs. You can configure the retention period for logs via the LogsRetentionInDays configuration parameter.
Query logs (#)
To query the logs:
- Visit the Amazon CloudWatch Console.
- Ensure that you are in the correct region.
- Navigate to Logs Insights.
- Select the attachmentAV logs log group (if you followed the docs, the name starts with
attachmentav-Logs-
). - Select a date range.
- Enter the following query:
fields @timestamp, @message
| filter @logStream like "/journald/attachmentav.service"
| sort @timestamp desc
- Click Run query.
Learn more about the CloudWatch Logs Insights query syntax or discover the following sample queries.
All attachmentAV logs (#)
fields @timestamp, @message
| filter @logStream like "/journald/attachmentav.service"
| sort @timestamp desc
All system logs (#)
fields @timestamp, @message, @logStream
| filter not (@logStream like "/journald/attachmentav.service")
| sort @timestamp desc
Export logs for attachmentAV support (#)
Please send us your AWS account ID and region first: hello@attachmentav.com. We respond with the S3 bucket name and bucket prefix with your upload token required for exporting logs.
- Visit the Amazon CloudWatch Console.
- Ensure that you are in the correct region.
- Navigate to Log groups.
- Click on the attachmentAV logs log group (if you followed the docs, the name starts with
attachmentav-Logs-
). - Choose Actions, Export data to Amazon S3.
- Set From and To.
- Select Another account.
- Set S3 bucket name to our S3 bucket (reach out to hello@attachmentav.com).
- Set the S3 bucket prefix to your upload token (reach out to hello@attachmentav.com).
- Click Export.
Remote access fallback (#)
If no logs show up in CloudWatch Logs, you can connect to one of the attachmentAV EC2 instances and run the following commands to get the logs:
sudo -i
journalctl -u attachmentav.service