Continuous Apache access log

Talks about metering
Post Reply
flane
Posts: 86
Joined: Mon Aug 11, 2014 7:22 am

Continuous Apache access log

Post by flane » Mon May 07, 2018 11:28 am

hi JeanmMarc,
with the latest versions of metern I noticed these lines in the apache access.log file:

Code: Select all

[07/May/2018:11:39:16 +0200] "GET /metern/programs/programlastdays.php HTTP/1.1" 200 2180 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:16 +0200] "GET /metern/programs/programmeter.php HTTP/1.1" 200 44425 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:16 +0200] "GET /metern/programs/programindicator.php HTTP/1.1" 200 360 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:16 +0200] "GET /metern/images/favicon-32x32.png HTTP/1.1" 304 182 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:16 +0200] "GET /metern/images/favicon-16x16.png HTTP/1.1" 304 182 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:16 +0200] "GET /metern/programs/programlive.php HTTP/1.1" 200 448 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:17 +0200] "GET /metern/programs/programindicator.php HTTP/1.1" 200 360 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:17 +0200] "GET /metern/programs/programlive.php HTTP/1.1" 200 448 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:18 +0200] "GET /metern/programs/programindicator.php HTTP/1.1" 200 360 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:18 +0200] "GET /metern/programs/programlive.php HTTP/1.1" 200 448 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:19 +0200] "GET /metern/programs/programindicator.php HTTP/1.1" 200 360 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:20 +0200] "GET /metern/programs/programlive.php HTTP/1.1" 200 448 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
[07/May/2018:11:39:20 +0200] "GET /metern/programs/programindicator.php HTTP/1.1" 200 360 "http://xxxxxxxxxxxxxxxxxxxxxxxx/metern/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
there are a lot of them and they tend to saturate the log.

Is it possible to avoid these logs?
Last edited by flane on Wed May 09, 2018 5:22 pm, edited 1 time in total.

jeanmarc
Posts: 1586
Joined: Thu Aug 29, 2013 7:16 am

Re: meterN 0.8

Post by jeanmarc » Mon May 07, 2018 4:31 pm

Hi Flane,
There is continous GET requests for the live things, i can't remove that. In Chrome press F12 then network, you'll see how much request it does..
Did you change anything in apache log ?

flane
Posts: 86
Joined: Mon Aug 11, 2014 7:22 am

Re: meterN 0.8

Post by flane » Tue May 08, 2018 8:42 pm

I have this section in apache2.conf

Code: Select all

# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
Here is also a guide: Apache Module mod_log_config
The line that generates the log of GET requests is

Code: Select all

LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
but I do not understand how I can modify Logformat to exclude GET requests :(

if I comment this line, a log is generated with:

Code: Select all

combined
combined
combined
....
a "combined" line for each GET request :( :(

jeanmarc
Posts: 1586
Joined: Thu Aug 29, 2013 7:16 am

Re: meterN 0.8

Post by jeanmarc » Wed May 09, 2018 6:52 am

Well, i don't know much about Apache, i use nginx. I simply disable access_log, i believe only error are useful.
I think you can comment CustomLog in httpd.conf to do so.

flane
Posts: 86
Joined: Mon Aug 11, 2014 7:22 am

Re: Continuous Apache access log

Post by flane » Wed May 09, 2018 7:55 am

OK thanks jeanmarc.
I have disabled only access.log as shown on this page:
HOW TO EASILY DISABLE LOG IN APACHE

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest