Lots of server-status queries in http-log

While debugging a proxy problem in NS I encountered lots of get server-status http requests every second, which fill the log files. Example:

localhost - - [19/Jul/2020:21:35:31 +0200] "GET /server-status?auto HTTP/1.1" 200 440 "-" "-"

What are they for and is there a possibility to deactivate them?

It’s the netdata service checking the web server.

To disable the log entry you may edit /etc/httpd/conf/httpd.conf and at line 217 comment out the CustomLog and add a custom one:

#CustomLog "logs/access_log" combined
SetEnvIf Request_URI "^/server-status$" dontlog
CustomLog "logs/access_log" combined env=!dontlog

Source:


2 Likes

Thanks. Perhaps this should become default in Nethserver.

Why? Unless you’re extremely short of disk space, why would you suggest this?

Because it makes log files unreadable.

Continuing the discussion from Lots of server-status queries in http-log:

I confirm your solution works. I think it should be marked as the topic solution :blush:

If you are short of disk space it is possible to enable log compression under System > Settings > ....

Sadly it requires changing the main httpd.conf file, which is not a template (by design choice) and I wouldn’t change that choice now. I tried every possible path for an additional drop-in .conf file: it seems a limitation of Apache that allows only the “addition” of “CustomLog” directives. There’s no way to remove an existing one by putting similar lines before or after httpd.conf inclusion.

I understand. May I suggest a grep -v server-status on them?

3 Likes