Answer the question
In order to leave comments, you need to log in
I am making a log parser for Apache in php, how to do it?
We need a parser that should do:
Answer the question
In order to leave comments, you need to log in
If there is no ready solution, you can:
1. First use glob() to find all the log files.
2. Then read each file in turn, for example, through fopen() and use regular expressions in a loop to select data according to some criteria.
We add all the information found through regular expressions to some array (and then display it somewhere), or, again, write it to the log.
To run once a day - use cron.
This parser has long been invented. If you want, you can use ready-made, free of charge without SMS.
Scroll through a couple of articles on ELK and go.
https://mkdev.me/posts/vvedenie-v-elk-sobiraem-fil...
https://medium.com/@kirill.sereda/elk-elasticsearc...
there are also vids
https://www. youtube.com/results?search_query=elk+%...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question