File Upload

The easiest way to get data into Loggly for a quick test is to upload a single file. To continuously monitor a file on production systems please use file monitoring instead. File upload assumes you are uploading text logs where each line is an event, with one our timestamp formats if you need timestamps, or with one of our accepted Log Types if you need parsed messages. You can send up to a maximum of 5MB per file, 1MB per event, no timestamps or parsable timestamps within your retention period and not older than the age of your account.

The following file types are not supported:
.bin, .exe, .lib, .dat, .mp3, .gif, .jpg, .jpeg, .bmp, .zip, .gz, .tar, .dll, .png, .img, .db, .lib, .pdf, .mp4, .mpeg, .mov, .jar, .pem, .crt, .doc, .xls, .xlsx, .docx, .ppt, .pptx, .dmg, .rar, .apk, and .7z

Linux or Mac Environment

  • Send Data

Paste the following command into the terminal window, then run it to upload the sample data to your account.

curl -X POST -T FILE.TXT https://logs-01.loggly.com/bulk/TOKEN/tag/file_upload

Replace:

      • FILE.TXT with the location of the log file you wish to read to the server.
      • TOKEN: your customer token from the source setup page

file-upload-terminal
You should get the response ok code.

  • Verify

Search Loggly over the past hour for the file_upload tag to see your log events:

tag:file_upload

file-upload-search

Windows Environment

  • Download cURL

Download the latest version of cURL for use on your Windows machine from the cURL website. Be sure to unzip the cURL files to a directory that is easy to access (e.g. c:\curl\).

  • Send Data

Open the Command Prompt program from the Start menu, then change to the curl installation directory.

cd c:\curl

Paste the following command into the terminal window, then run it to upload the sample data to your account.

curl -X POST -T FILE.TXT https://logs-01.loggly.com/bulk/TOKEN/tag/file_upload

Replace:

      • FILE.TXT with the location of the log file you wish to read to the server.
      • TOKEN: your customer token from the source setup page
  • Verify

Search Loggly over the past hour for your tag to see your log events:

tag:file_upload

Troubleshooting

If you don’t see any data show up, then check for these common problems:

  • Wait a few minutes in case indexing needs to catch up
  • Check the search page over the past day in case the timestamps are different from the current UTC time
  • Make sure you sent data within the limits of 5MB max file size, 1MB per event, and no timestamps or parsable timestamps within your retention period and not older than the age of your account.
  • Remember to replace the filename and your token before using the curl command

Still Not Working?

Thanks for the feedback! We'll use it to improve our support documentation.


Top