Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Sending PHP Event Messages to Remote Logstash on Windows
Dec 05, 2016 @ 18:20:09

The SitePoint PHP blog has a recently posted tutorial showing you how to send event messages from PHP to a remote Logstash server running your PHP on a system with Windows installed. Logstash's goal is to centralize the logging in your environment, allowing you to input log information from a wide range of sources and stored in an Elasticsearch database.

By opening this article you’ve endeavored yourself to expanding your knowledge of PHP applications as part of event-based distributed systems. You’ll be given a quick intro into what we are referring to when we say event messages, what Logstash is, and why it is so cool.

If you’ve already heard of Beats or understand you can run Logstash locally to ship logs to another Logstash instance or directly to a datastore such as Elasticsearch, this article is still for you and will show you an easy-to-configure-and-run, hopefully more effective and certainly fun-to-use alternative.

They start with the quick introduction to Logstash and how the event handling they'll add in later will relay messages over to the waiting server. A code example is included showing how to manually write to rsyslog, pointing out that it and Logstash use a similar protocol to receive messages. The tutorial then shows how to view the messages in the log to ensure they're making it correctly and how to use this agent to stream messages over to the waiting server.

tagged: sitepoint event messages remote logstash windows agent tutorial

Link: https://www.sitepoint.com/sending-php-event-messages-to-remote-logstash-on-windows/


Trending Topics: