Thanks for your comments. Under vi /etc/php.ini I can see the date.timezone as commented, as illustrated below.
[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.c ... e.timezone
;date.timezone =
From the logs grep -R -i "log" /etc/httpd/* I can see messages "We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://10.202.21.19/nagiosxi/includes/c ... &dest=auto".
Shall I uncomment date.timezone under vi /etc/php.ini and set it as date.timezone ='Europe/Berlin'.
Kindly suggest.
Post 2:
I get below output on firing date command.
Mon Jun 3 10:59:02 CEST 2013
As such we are using time zone Europe/Oslo in our Hoegh Enivornment, so then I should set date.timezone ='Europe/Oslo' please suggest.
Aslo I believe after after making the said changes, httpd logs won't grow so tremendously with those timezone error records, kindly comment.
Last I believe that after all these changes, if I restart httpd services, I can expect to have proper log rotation of logs, with writing current records to new logs and I can delete the old grown logs.
-rw-r--r-- 1 root root 49G May 23 16:11 error_log-20121007
-rw-r--r-- 1 root root 3.6G May 23 16:11 access_log-20121007
httpd logs growing heavily
Re: httpd logs growing heavily
Last edited by slansing on Mon Jun 03, 2013 9:46 am, edited 1 time in total.
Reason: Please do not double post if you are the last poster, this reduces clutter.
Reason: Please do not double post if you are the last poster, this reduces clutter.
Re: httpd logs growing heavily
Please follow the timezone document to get your datetime issues sorted out: http://assets.nagios.com/downloads/nagi ... m_Time.pdf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: httpd logs growing heavily
Thanks for the comments. We would have our maintenance task this month 22nd June, so I was planning to make all the suggested changes that day. PFB steps and kindly point out anything to be altered in the plan.
1.With regards to timezone conflicts through PHP functions, we have to set ZONE="Europe/Oslo" under /etc/php.ini through date.timezone=Europe/Oslo as it is set already under /etc/sysconfig/clock.
2. Stop Apache Server using service httpd stop.
3. Move error_log-20121007 and access_log-20121007 to some temporary folder.
4. Start Apache Server using service httpd start.
5. Verify the status of Apache Server using service httpd status.
6. Verify that the error_log and access_log are getting rotated that is they should be in use and the old logs name gets appended with date suffix.
1.With regards to timezone conflicts through PHP functions, we have to set ZONE="Europe/Oslo" under /etc/php.ini through date.timezone=Europe/Oslo as it is set already under /etc/sysconfig/clock.
2. Stop Apache Server using service httpd stop.
3. Move error_log-20121007 and access_log-20121007 to some temporary folder.
4. Start Apache Server using service httpd start.
5. Verify the status of Apache Server using service httpd status.
6. Verify that the error_log and access_log are getting rotated that is they should be in use and the old logs name gets appended with date suffix.
Re: httpd logs growing heavily
This sounds right.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: httpd logs growing heavily
Yes this sounds about right, specifically for the timezone stuff, unfortunately they don't talk to each other (php and local system) and it does make a difference. Let us know how it goes!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: httpd logs growing heavily
The activity went smoothly. Thank a lot for the guidance.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: httpd logs growing heavily
Great! Anything else regarding this?
Re: httpd logs growing heavily
Nothing more, believe we are good now. Thanks !!!