Submission of logstash from the azure web application. How?

I have a web application hosted on the azure platform, and an ELK stack hosted on a virtual machine, also in azure (same subscription), and I'm struggling to find a way to send logs from the application to logstash.

The web application stores all its files in a storage accessible only via FTP, for which there is no input plugin in logstash.

What do people use to send logs to ELK from web applications? If it works as a virtual machine, I would use NXlog, but this is not possible for a web application.

I also use Log4Net and tried UDP forwarding, which worked on my local ELK stack but not on azure hosting, despite the fact that I was adding a public UDP endpoint.

+4
source share
2 answers

I am currently using Serilog to inject application log messages (in batch mode) into the Redis queue , which in turn is read by Logstash to enrich them and paste them into Elasticsearch. This results in a robust distributed configuration that does not lose application logs if the redis max queue is not exceeded. Added bonus; Serilog emits json, so your logstash configuration can remain pretty simple. Sample code can be found here: https://gist.github.com/crunchie84/bcd6f7a8168b345a53ff

+6

Azure GitHub, azure-diagnostics-tools, LogStash blob , .

, blob/table WebApp LogStash, ElasticSearch.

, log4net blob, log4net.Appender.TraceAppender Trace, Blob/Table, WebApp.

FTP - Kudu REST VFS API ( ) HTTP. , FTP.

+2

Source: https://habr.com/ru/post/1616188/


All Articles