[syswatch-users] Adding additional Logs
Brought to you by:
smirks
|
From: hawkeye <ha...@ha...> - 2000-11-28 02:24:21
|
In my last post I mentioned what I did to add more logs to be proccessed and displayed. I did this this with my Apache access_log and the error_log files. This evening I noticed that when cron ran last night it quit reading those 2 files. I then decided to add a restart to cron so the files can be read. I created a file called apache_restart in /usr/local/sbin and added the following: /usr/local/apache/bin/apachectl restart Then set permissions to: chmod 750 /usr/local/sbin/apache_restart I the created a file called apache_restart in /etc/cron.daily and added the following: #!/bin/sh PATH=/usr/bin:/bin:/sbin:/usr/sbin /usr/local/sbin/apache_restart | mail -s "Apache Restart `/bin/hostname` at `/bin/date ' +%H:%M/%m-%d-%Y'`" root Then set permissions to chmod 750 /usr/local/sbin/apache_restart The above will run with cron daily and execute the script in /usr/local/sbin. It will the email the results to root. The following is what my email looked like: Date: Mon, 27 Nov 2000 21:15:31 -0500 From: root <ro...@ha...> To: ro...@ha... Subject: Apache Restart hawkeye.dynhost.com at 21:15/11-27-2000 /usr/local/apache/bin/apachectl restart: httpd restarted ### If anyone has a better way of doing this please post back to the list. I am failry new at this so what you see here from me is just tinkering for me to get things to run the way I want them to run. David Price |