Re: [syswatch-users] Adding additional Logs
Brought to you by:
smirks
|
From: Smirks <sm...@sm...> - 2000-11-28 16:24:48
|
First of all, I don't quite understand what is going on and why you have to restart apache, but here's what I think.... I'm guessing apaches logs are being rotated on a nightly basis. Well, apache is quite picky and when it's logs are rotated it cant write to a new file without being restarted first. That seems to be what is going on here, so the fix you have put it place should be ok. :) Chris On Mon, 27 Nov 2000, hawkeye wrote: > 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 > > _______________________________________________ > syswatch-users mailing list > sys...@li... > http://lists.sourceforge.net/mailman/listinfo/syswatch-users > |