ccze is a wonderful tool that brings real joy to the arduous task of reading or searching thru log files. It uses a modular approach to support custom colour formatting for popular applications such as Apache, Postfix, Exim, etc.

ccze on Centos / Fedora Linux

First enable Epel repository and run following command:

# yum install ccze -y

ccze on Debian / Ubuntu Linux

On Debian/Ubuntu, you can use apt-get to install:

# apt-get install ccze -y

How to use ccze tool

ccze colourises logs that are sent to standard out, for example, we can use tailf to follow a log file and then prettify the output by piping to ccze, examples:
# tail /var/log/syslog | ccze -A


Export log files to html file using ccze tool
#cat /var/log/syslog | ccze -h > ~/Desktop/syslog.html
Example:


This tool comes with plenty of options. You can customize it more in these file
#/etc/cczerc, $HOME/.cczerc
To see list of plugins available just d
#ccze -l
Example output:
  1. # ccze -l
  2. Available plugins:
  3.  
  4. Name | Type | Description
  5. ------------------------------------------------------------
  6. apm | Partial | Coloriser for APM sub-logs.
  7. distcc | Full | Coloriser for distcc(1) logs.
  8. dpkg | Full | Coloriser for dpkg logs.
  9. exim | Full | Coloriser for exim logs.
  10. fetchmail | Partial | Coloriser for fetchmail(1) sub-logs.
  11. ftpstats | Full | Coloriser for ftpstats (pure-ftpd) logs.
  12. httpd | Full | Coloriser for generic HTTPD access and error logs.
  13. icecast | Full | Coloriser for Icecast(8) logs.
  14. oops | Full | Coloriser for oops proxy logs.
  15. php | Full | Coloriser for PHP logs.
  16. postfix | Partial | Coloriser for postfix(1) sub-logs.
  17. procmail | Full | Coloriser for procmail(1) logs.
  18. proftpd | Full | Coloriser for proftpd access and auth logs.
  19. squid | Full | Coloriser for squid access, store and cache logs.
  20. sulog | Full | Coloriser for su(1) logs.
  21. super | Full | Coloriser for super(1) logs.
  22. syslog | Full | Generic syslog(8) log coloriser.
  23. ulogd | Partial | Coloriser for ulogd sub-logs.
  24. vsftpd | Full | Coloriser for vsftpd(8) logs.
  25. xferlog | Full | Generic xferlog coloriser.

0 komentar:

Posting Komentar

 
Top