-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standard HTTP output? #149
Comments
I don't see anything like that listed in output plugins. Maybe @megastef will know. |
@alexbowers It would be interesting to know exactly your use case. Which HTTP server would receive the logs? The command above Try
Netcat will print:
Note the HTTP interface to Elasticsearch uses the Elasticsearc bulk indexing format (one line indexing command, one line data). It should be easy to implement a plugin with plain HTTP output (one JSON doc per HTTP post request). But I would recommend a small buffer and post an Array of logs. If you have interest to contribute the HTTP output plugin, then you could simply remove the the Slack specific code from the Slack ouptut plugin: Another interesting way might be to use the MQTT Broker output plugin, you can subscribe via WebSocket to the MQTT Broker. I hope this helps. We would be glad to add HTTP output plugin. On the other hand we should specifiy a format (one log per post request or multiple logs per request, line delimited JSON format or JSON array etc). |
@megastef Thanks for the reply. My interest is in trying to get the logs sent into a custom written application for us to do some looking at. The logs are not necessarily typical apache logs or anything like that, they may be custom logs written that we want to push into some of our monitoring system thats built in house. We could store it in Elastic search and then try to query and pull the data out of there, but we'd like to get it direct into our system via a HTTP post request to the application itself if possible. I think having the batching makes sense, since it would be not ideal to saturate the application with post requests more than necessary. I'll have a think on this a little more and have a look at how to do a raw HTTP plugin. |
There is also InfuxDB output plugin using HTTP: https://sematext.com/docs/logagent/output-plugin-influxdb/ and influx protocol sounds like a good choice for monitoring data. The InfluxDB plugin implements also batch/buffering and uses InfluxDB line protocol format. Interesting we have so many HTTP plugins, that we should consider to generalize those and support N formats in the POST request :) |
Evaluating logagent, we intend to install the agent as a DaemonSet in Kubernetes workers and then tail the container logs. It'd be nice if we could just forward the logs to custom HTTP/TCP/UDP for further processing (like Logstash or Fluentd etc.) Was surprised to look at the output plugins and see nothing about forwarding raw messages? |
What sort of further processing are you after? Perhaps that could be done with Logagent itself (and keep the ingestion pipeline simpler)? |
@chiefy check the list of plugins: https://sematext.com/docs/logagent/plugins/ Setup on Kuberentes is described here: https://sematext.com/docs/logagent/installation-docker/ Please read https://sematext.com/blog/docker-container-monitoring-with-sematext/#toc-container-logs-0 |
Implemented output-http plugin with ld-json format (JSON lines) in 11ad607 Set maxBufferSize to to 1 and logagent sends one JSON object per log event. See example config file:
run
Contributions for alternative formats in the HTTP body are welcome ... |
Doesn't "Buffer" make you think of "bytes"? |
Hi,
I'm trying to find out how to send the log lines to a HTTP server (not elastic search or an rtail server).
Is this possible?
I've tried using
logagent --http-proxy 'http://localhost:9200' -g 'logs/*.log'
but no request gets made to the proxy server.The text was updated successfully, but these errors were encountered: