httpd logs growing heavily

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: httpd logs growing heavily

Post by HAL »

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
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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: httpd logs growing heavily

Post by abrist »

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.
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: httpd logs growing heavily

Post by HAL »

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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: httpd logs growing heavily

Post by lmiltchev »

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

Post by sreinhardt »

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.
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: httpd logs growing heavily

Post by HAL »

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

Post by slansing »

Great! Anything else regarding this?
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: httpd logs growing heavily

Post by HAL »

Nothing more, believe we are good now. Thanks !!!
Locked