How to add more files to DirectAdmin Log Viewer

DirectAdmin Log Viewer lets you inspect the most important log files from your server. If you prefer the GUI over the command line, you might want to add files to the DA list. The default list with log files is in /usr/local/directadmin/data/templates/logs.list and contains:

/var/log/httpd/error_log=Apache Error Log
/var/log/httpd/access_log=Apache Access Log
/var/log/httpd/suexec_log=Apache Suexec Log
/var/log/httpd/homedir.log=Apache ~/user and IP Log
/var/log/suphp.log=suPHP Log
/var/log/nginx/error_log=Nginx Error Log
/var/log/nginx/access_log=Nginx Access Log
/var/log/exim/mainlog=Exim Mainlog
/var/log/exim/rejectlog=Exim Rejectlog
/var/log/exim/paniclog=Exim Paniclog
/var/log/messages=System Messages
/var/log/syslog=System Messages
/var/log/maillog=System Mail Log
/var/log/mail.log=System Mail Log
/var/log/ Mail Information
/var/log/mail.err=System Mail Errors
/var/log/mail.warn=System Mail Warnings
/var/log/auth.log=System Authentication Log
/var/log/secure=System Security Log
/var/log/dmesg=Kernel Log
/var/log/cron=Cron Log
/var/log/directadmin/error.log=DirectAdmin Error Log
/var/log/directadmin/errortaskq.log=DirectAdmin Task Queue Log
/var/log/directadmin/security.log=DirectAdmin Security Log
/var/log/directadmin/system.log=DirectAdmin System Log
/var/log/directadmin/login.log=DirectAdmin Login Log
/var/log/proftpd/access.log=Proftpd Access Log
/var/log/proftpd/auth.log=Proftpd Auth Log
/var/log/pureftpd.log=PureFTP Log
/var/www/html/roundcube/logs/errors=RoundCube Errors
/var/www/html/roundcube/logs/sendmail=RoundCube Sends

To edit (add/remove) files from it, first of all, you will need to copy the file to a custom directory as:

mkdir -p /usr/local/directadmin/data/templates/custom
cd /usr/local/directadmin/data/templates/custom
cp -p ../logs.list .

Now you can edit the custom file /usr/local/directadmin/data/templates/custom/logs.list . To add a new entry from the command line, use:

echo "path_to_log_file=description" >> /usr/local/directadmin/data/templates/custom/logs.list 

Example for adding the csf – lfd log:

echo "/var/log/lfd.log=lfd log" >> /usr/local/directadmin/data/templates/custom/logs.list

Leave a Reply