1
vote
1answer
871 views

PHP Script To Monitor Apache Access Log Files using TAIL [closed]

I wrote a PHP script to live monitor the apache access_log file. I am using the following commands; $path_to_tail = '/usr/bin/tail'; $path_to_access_file = '/var/log/httpd/access_log'; ...
2
votes
3answers
119 views

Search for a log pattern continuously

I am preparing a log watch dog but my concern is tailing always would blow up in some point. Thus, My concern is to monitor the log file always and if a pattern match occurs. Issue some commands on ...
2
votes
2answers
413 views

“tail -f” style web application

I've been searching for a small but functional PHP script or similar that I can expose via apache. Basically I'd like what "tail -f /var/log/something" does, but visible via a web browser. I'm finding ...
21
votes
4answers
4k views

In tail -f, how do I filter out stuff that has certain keywords?

I want to tail -f my logs. However, I want to filter out everything that has the words: "ELB", "Pingdom", "Health"
0
votes
3answers
471 views

how to “batch” output of “tail -F” or output all data in a stream every X seconds?

I am trying to monitor a log file in real-time. Say I issue a command such as: tail -F mysystem.log|grep -i error|mail ... This is supposed to monitor my log file, every time it sees an error, email ...
1
vote
4answers
1k views

`tail -f` sometimes stops updating - and the file hasn't moved

I have noticed recently that sometimes tail -f <logfile> will stop updating to the screen. Doing a Ctrl>-C and restarting the tail works fine, though. And I checked to make sure the logfile ...
1
vote
2answers
796 views

Best tools for “ssh tail -f” style log file monitoring and analysis

I'm looking for a tool to monitor custom PHP Error logs/Apache and possibly Java logs on remote development servers. I'm not looking for a full production log system like Splunk, but something that's ...
1
vote
4answers
106 views

Count amount of new lines with interval in log

Is there a way/tool to tail or watch a logfile and report the amount of lines it grows? E.g. I want to see the amount of new entries in mysql.log every 3 seconds. watch wc -l /path/to/log.log1 ...
5
votes
6answers
4k views

Colour tail of Apache logs

Monitoring apache logs with tail –f tends gets very frustrating for the eyes after a while. Are there any tool/options to colorize the log outputs? Maybe signal FATAL with red, etc...
6
votes
2answers
969 views

Tail server logs into XMPP?

So I have two files, and if a new line appears on either of these files, I'd like to receive an IM (preferably jabber or gTalk) containing the contents of that line. Do you guys have any suggestions ...
2
votes
2answers
259 views

Bash edit file and keep last 500 lines

I am looking to create a cron job that opens a directory loops through all the logs i have created and deletes all lines but keep the last 500 for example. I was thinking of something along the lines ...
3
votes
4answers
1k views

“watching” a log on FreeBSD vs Linux

On Linux systems I can watch -n1 tail /var/log/whatever.log or watch -n1 grep somestuff /var/log/whatever.log To show updates to a log every 1 seconds. On FreeBSD however, the watch command does ...
11
votes
10answers
7k views

Tail multiple remote files

Is there a way to remote tail 2 files? I have two servers(a and b) behind a load balancer and I would like to do something like this if possible: tail -f admin@serverA:~/mylogs/log ...
4
votes
3answers
1k views

Monitor multiple Linux log files in real time

I'm debugging a Linux application that allows remote jobs to be submitted, logging the output from each job in a new file. The log file paths conform to: /joblogs/job_*/JOB.LOG where the wild card ...