Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

With the same REST API, you can index logs directly from your application, or you can craft your own "log sender". 

NOTE:
If you are sending logs from your application use the Elasticsearch HTTP API. If you are sending logs from a Java application use a library like log4j2-elasticsearch-http or Jest instead of Elasticsearch TransportClient.


Besides specifying your Logsene app token as the index name, it's nice to have a field named "@timestamp".  Its value should be a valid ISO 8601 timestamp. This will be used for searching and sorting when/if you use Kibana with Logsene. If you don't provide a timestamp, Logsene will add one when it receives your message.

...

  1. Create a new Logsene app with new mapping and start shipping your logs there instead
  2. Remove the old mapping - which also remove all logs from the type - and retry putting the new mapping. Here's an example of removing a mapping:}
     
Code Block
languagebash
curl -XDELETE "https://logsene-receiver.sematext.com/$TOKEN/userlogs"

...