A new log file Viewer
kerryg posted a list of
trixbox CE projects for which fonality would match a bounty. This set me wondering what open source projects were already out there that might fit some of the tasks or be adapted for inclusion in trixbox or freePBX.
The log viewing option in freePBX and trixbox is very limited and there has been discussion here about better ways of extracting information from log files.
A web search found LogzMon, an open source / GPLV3 licensed log viewing program.
Main Benefit for LogzMon
- It makes reading log files a lot easier.
- Set a page length, from drop down list, for the section of log file to be viewed
- Page forwards and backwards through the log file
- Jump to the start and to the end of the log file
- It will read any text file, log file or archive.
- You can set 'target' expressions that filter the log file being viewed and cause lines in the file to be highlighted. You can set the fg and bg colour for the line in the log file that contains the particular expression.
- It only requires PHP to be installed (and of course a web server)
- It can be installed very easily on a trixbox server
- A simple hack incorporates it into freePBX. Obviously a hack is not the best way of doing this and this hack will be overwritten if you update freePBX.
- It will periodically rescan log files and initiate actions (email / SMS msgs) based on regex values in the logs. I have not yet tested this particular feature, yet.
Methodica LogzMon is written by Hans E. Herger. His website for LogzMon is http://tools.methodica.info/htm_en/logviewer/overview.htm
I have installed and tried LogzMon with tb 2.0 and 2.2 and tried my hack that incorporates a link for LogzMon with freePBX 2.2.0rc3 and 2.2.1
You can just d/l the program to /var/www/html/admin using wget and untar it. You need to set the config in just one file, logviewer_config.inc.php. As far as I can tell the default file permissions let the program work without change.
I have written a How-To http://cat24.net/LogViewer.html that describes how I installed LogzMon with TB2.0 and 2.2. It also covers the basic configuration, setting the log files that are listed for viewing, setting the filters and testing.
I have suggested some keywords like sip, iax, zap, voice, unable etc that can then colour the selected line in the log file. What you do here is entirely up to you.
In order to check what hardware, eg telephony cards, is recognised at boot time it is useful to have a boot file that is readable by LogzMon. LogzMon will only read files that are owned or in the group 'asterisk' or are world readable. This excludes boot.log. So:
dmesg > /var/log/boot.msg
generates a file boot.msg that can then be read along with the other logs. You can add this to /etc/rc.d/rc.local if you wish and regenerate the file at each boot. You could also change the permissions on the existing boot.log file.
I think the final webpage layout could be improved, the CSS for FF could do with some tweaking. The CSS for IE seems OK.
I can think of a number of improvements / additions for LogzMon and it can obviously be improved. A bounty might help the original author to do this. Alternatively I would also be happy to put some time in - if there was sufficient interest from other users.
LogzMon may be a good addition to trixbox and freePBX. Please checkout my How-To http://cat24.net/LogViewer.html and let me know what you all think.
Thanks

Member Since:
2006-06-07