D
D
den4eg112015-02-15 13:17:13
PHP
den4eg11, 2015-02-15 13:17:13

Is there a framework for processing logs?

Is there a framework for processing logs/text? Let's say logging is in progress on the server, every day it is saved to a separate file, data about the player's nickname, IP, and other parameters are saved through a certain separator. Sometimes you need to analyze under what nicknames the player logged in from a certain IP, on what day, and so on. Now this is implemented by directly opening each log file and searching for data. I would like to find a PHP framework that would help write reading new logs, adding to the database, searching by parameters. As I understand it, this will be an analysis + a cron script that will download and process data. I am superficially familiar with PHP.
Upd:
Just in case, I'll try to explain the essence.
My solution will be in 2 parts, I see no other options:
Log import: downloads new logs via FTP by cron, reads them, enters information into the database (in my case, MySQL)
Log analyzer: web interface that allows you to search by parameters, sorting
Let's say I have the following lines in the 15022015log file:
17:33:08 |nick |99.199.999.9
17:33:08 |nick2 |99.199.999.9 17:33:08
|nick |11.111.111.1
log new lines, if successful, imports into the database for example 17:33:08, nick, 99.199.999.9 in separate columns
The second script for the web interface sorts the data, gives you the ability to search by parameter (by matching parameters), etc. .
Perhaps there are ready-made solutions or a specialized framework for the first and second parts. So that you can simply set up the import of information from logs by specifying a separator and a ready-made solution for displaying and sorting information that could be added based on individual needs

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Lozovyuk, 2015-02-15
@aleks_raiden

You can also use powerful systems like www.elasticsearch.org/overview/kibana

M
MintTea, 2015-02-15
@MintTea

Have you looked at monolog ?
A lot of handlers are written under it, incl. you can write your own.
You can also log directly to the database .

I
index0h, 2015-02-15
@index0h

As a log parser, you can use logstash, a very handy thing. Usually used in conjunction with ElasticSearch and Kibana
In principle, under your case, also look towards StatsD + Graphite And towards influxdb

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question