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:

  1. Visit the Amazon CloudWatch Console.
  2. Ensure that you are in the correct region.
  3. Navigate to Logs Insights.
  4. Select the attachmentAV logs log group (if you followed the docs, the name starts with attachmentav-Logs-).
  5. Select a date range.
  6. Enter the following query:
fields @timestamp, @message
| filter @logStream like "/journald/attachmentav.service"
| sort @timestamp desc
  1. 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.

  1. Visit the Amazon CloudWatch Console.
  2. Ensure that you are in the correct region.
  3. Navigate to Log groups.
  4. Click on the attachmentAV logs log group (if you followed the docs, the name starts with attachmentav-Logs-).
  5. Choose Actions, Export data to Amazon S3.
  6. Set From and To.
  7. Select Another account.
  8. Set S3 bucket name to our S3 bucket (reach out to hello@attachmentav.com).
  9. Set the S3 bucket prefix to your upload token (reach out to hello@attachmentav.com).
  10. 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

Need more help?

Write us, and we'll get back to you as soon as we can.

Send us an email