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

SitePoint PHP Blog:
How Can the ELK Stack Be Used to Monitor PHP Apps?
May 12, 2016 @ 15:42:36

The SitePoint blog has posted a new tutorial from author Daniel Berman about using the ELK stack to monitor PHP applications. The ELK stack is made up of Elasticsearch, Logstash and Kibana to make for effective log storage and searching.

A modern web application environment consists of multiple log sources, which collectively output thousands of log lines written in unintelligible machine language. If you, for example, have a LAMP stack set up, then you have PHP, Apache, and MySQL logs to go through. Add system and environment logs into the fray — together with framework-specific logs such as Laravel logs — and you end up with an endless pile of machine data.

Talk about a needle in a haystack. [...] The ELK Stack (Elasticsearch, Logstash, and Kibana) is quickly becoming the most popular way to handle this challenge. Already the most popular open-source log analysis platform — with 500,000 downloads a month, according to Elastic — ELK is a great way to centralize logs from multiple sources, identify correlations, and perform deep-data analysis.

They walk you through the full installation of all three tools starting with Java (they all require it) followed by instructions for each piece. Once they're all up and running (and playing nice together) they help you configure it to pull in Apache access logs and search on the results. They then populate it with quite a bit more sample data and share some basic tips on searching using the custom searching "language". Finally they talk about the visualizations Kibana offers complete with an example showing browser percentages from users of the site.

tagged: elk stack tutorial monitor elasticsearch logstash kibana setup configure apache log

Link: http://www.sitepoint.com/how-can-the-elk-stack-be-used-to-monitor-php-apps/


Trending Topics: