0

I have a simple configuration with a http output plugin firing to a custom service. What I'd like to obtain is to log on another Elastic Search any http:50x status codes that logstash may get when forwarding the message to my service.

Is it in any way possible to use the status code of an output plugin as condition for another one?

Cavaz
  • 2,996
  • 24
  • 38
  • These answers might help: https://stackoverflow.com/questions/39897198/logstash-capture-http-response-from-http-output-plugin/39909663#39909663 + https://stackoverflow.com/questions/37436376/logstash-http-poller-first-url-requests-response-should-be-input-to-second-url/37438666#37438666 – Val Apr 16 '18 at 09:45
  • What you could do is that your http output could call a Logstash http input which would act as a proxy for your custom service. That way, your http output would call your http input, which in turn calls your service and receives a response code that you can then index into ES via another ES output. – Val Apr 16 '18 at 09:46
  • uhm, I'm not following. Even with this loop the "first stage" will get the http status code only while in the _output section_ of the configuration, which brings me back to the original problem... unless I'm able to perform the request in the _filter section_, which *may* be doable with some ruby code. But that would be so ugly... – Cavaz Apr 16 '18 at 10:26

0 Answers0