Can I push logs to logstash via an API endpoint?

We have ~30 services that run on customer-premise (not our premise) and we'd like to push logs from our service on their machine to an Elasticsearch instance for debugging and analysis. We'd like to avoid having to install something like Filebeat on the customer machine, instead, it would be great if we could embed something directly into our application. Two options I can think of:

  • Our existing logger would just tee-writer out to an logstash client that pushes logs up behind the scenes.
  • We embed part of the filebeats code directly into our Go application

Has anyone done this before, and are there any existing solutions to do this?

Yes, you can.

You can use the http input plugin to receive logs using HTTP requests.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.