Answers: <p>It depends on what you're trying to accomplish but IMO if you're interested in reliably getting your exceptions you probably want something between Elasticsearch and your app - a queueing or logging system of some kind like Kafka or Redis.</p>
  <p>Send your exceptions there and then drain that to Elasticsearch. Otherwise you run the risk of overwhelming ES's ability to accept writes at the very time you need it most (cascading failure, DDOS etc).</p>
  
Answers: CC BY-SA 4.0
Answers: 2020-08-24T13:07:30.720Z
Answers: 2020-08-24T13:07:30.720Z
Answers: TheFiddlerWins
Answers: <p><a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html</a></p>
  
  <blockquote>
  <pre><code>POST test/_update/1
  {
      "script" : {
          "source": "if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }",
          "lang": "painless",
          "params" : {
              "tag" : "blue"
          }
      }
  }
  </code></pre>
  </blockquote>
  
Answers: CC BY-SA 4.0
Answers: 2019-07-27T09:26:46.787Z
Answers: 2019-07-27T09:26:46.787Z
Answers: 030
Body: <p>I am working with devs wishing to replace Exceptionless, a Real-time exception reporting tool.</p>
  
  <p>They wish to send the exceptions from a web app that they would previously send to Exceptionless to our ELK stack.</p>
  
  <p>I am only experienced with using Beats to ship data to ELK. </p>
  
  <p>In the past I have written custom code to do similar things like this, but we shipped to Splunk, not ELK.</p>
  
  <p>How friendly is the process of sending information to ELK via REST? Are their tips, tricks and/or pitfalls?</p>
  
  <p>Is this a supported, recommended, and good way to do exception logging/reporting/analytics/etc. </p>
  
Tags: <elastic>
Title: Sending Exceptions to Elastic Stack via REST
UserDisplayName: David West
ThreadText: # Sending Exceptions to Elastic Stack via REST
  
  (Asked by: username_0 on 2019-07-27)
  
  I am working with devs wishing to replace Exceptionless, a Real-time exception reporting tool.
  
  They wish to send the exceptions from a web app that they would previously send to Exceptionless to our ELK stack.
  
  I am only experienced with using Beats to ship data to ELK.
  
  In the past I have written custom code to do similar things like this, but we shipped to Splunk, not ELK.
  
  How friendly is the process of sending information to ELK via REST? Are their tips, tricks and/or pitfalls?
  
  Is this a supported, recommended, and good way to do exception logging/reporting/analytics/etc.
  
  **Tags:** elastic
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-08-24. Score: 1
  
  It depends on what you're trying to accomplish but IMO if you're interested in reliably getting your exceptions you probably want something between Elasticsearch and your app - a queueing or logging system of some kind like Kafka or Redis.
  
  Send your exceptions there and then drain that to Elasticsearch. Otherwise you run the risk of overwhelming ES's ability to accept writes at the very time you need it most (cascading failure, DDOS etc).
  
  
  ---
  
  ### Answer by username_2 on 2019-07-27. Score: 0
  
  <https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html>
  
  > ```
  > POST test/_update/1
  > {
  >     "script" : {
  >         "source": "if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }",
  >         "lang": "painless",
  >         "params" : {
  >             "tag" : "blue"
  >         }
  >     }
  > }
  >
  > ```
  
  
  ---
  
  