cURL is a command line utility for transferring data. cURL is a quick and easy way to test your configuration or troubleshoot your connectivity to Layerlog.

You can upload JSON or plain text files.

Limitations
  • Max body size is 10 MB (10,485,760 bytes)
  • Each log line must be 500,000 bytes or less
  • If you include a type field in the log, it overrides type in the request header

Upload a JSON log file

Before you begin, you’ll need: cURL

Upload the file

If you want to ship logs from your code but don’t have a library in place, you can send them directly to the Layerlog listener as a minified JSON file.

cat /path/to/log/file | curl -X POST "https://<<LISTENER-HOST>>:8071?token=<<LOG-SHIPPING-TOKEN>>&type=<LOG-TYPE>" -v --data-binary @-

Replace the placeholders to match your specifics. (They are indicated by the double angle brackets << >>):

  • Replace <<LOG-SHIPPING-TOKEN>> with the token of the account you want to ship to.

  • Replace <<LISTENER-HOST>> with the host for your region. For example, listener.layerlog.com if your account is hosted on AWS US East, or listener-nl.layerlog.com if hosted on Azure West Europe.

  • Declare your log type for parsing purposes. Layerlog applies default parsing pipelines to the following list of built-in log types. If you declare another type, contact support for assistance with custom parsing. Can’t contain spaces. Otherwise, the default type is http-bulk.

Check Layerlog for your logs

Give your logs some time to get from your system to ours, and then open Kibana.

If you still don’t see your logs, see log shipping troubleshooting.