Server Statistics not displayed in CSF

CAISC

Verified User
Joined
Dec 2, 2021
Messages
59
Location
SSH Terminal
Hi,

Post installation of Direct Admin CSF was automatically installed, its running fine.
But I have noticed its not showing the button for System Statistics

Not sure its because Direct Admin does not support it or some required modules are missing.
Are there some additional changes to be done to enable System Statistics in CSF firewall?

Under CSF Statistics Settings I have enabled -
ST_ENABLE = ON
ST_SYSTEM = ON
ST_MYSQL = ON
ST_LOOKUP = ON

Thanks
 

apogee

Verified User
Joined
Jul 6, 2019
Messages
123
Location
Europe
In order for the statistics to be generated, the dependencies must first be installed:
Code:
yum install perl-libwww-perl.noarch perl-LWP-Protocol-https.noarch perl-GDGraph
 

CAISC

Verified User
Joined
Dec 2, 2021
Messages
59
Location
SSH Terminal
I use CXS Scanner also, to install it there is a prerequisite to install -

yum install perl-libwww-perl.noarch perl-LWP-Protocol-https.noarch perl-Archive-Tar.noarch perl-Archive-Zip.noarch perl-Linux-Inotify2 perl-Compress-Zlib sqlite perl-DBI perl-DBD-SQLite perl-IO-Socket-SSL.noarch perl-Net-SSLeay.x86_64 sqlite

So its already there.

Installed perl-GDGraph

Now see the button. Thanks @apogee

Stats is not able to gather disk, apache and mysql data -

lfd[861511]: STATS: Unable to retrieve Apache Server Status [http://127.0.0.1/server-status?auto] - Unable to download: Unauthorized
lfd[882994]: STATS: 15 sec. timeout performing ST_MYSQL
 
Last edited:

CAISC

Verified User
Joined
Dec 2, 2021
Messages
59
Location
SSH Terminal
/etc/httpd/conf/extra/httpd-info.conf

file says -

<Location /server-status>
SetHandler server-status
AuthType basic
AuthName "Apache status"
AuthUserFile /var/www/html/passwd-server-status
Require valid-user
</Location>

currently when rewriting conf, a username and password is auto generated to see server-status page on localhost.
Not sure how to pass it in CSF.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
7,646
Location
Maastricht
Ah that is probably the new one. I still use old one because I used the custom setup.
There is indeed a passwd-server-status in the /var/www/html directory, but I don't know which password is used there, maybe somebody can enlighten us.

However if you want, you can choose to use a custom one. You have to create this/these directory('s):
/usr/local/directadmin/custombuild/custom/ap2/conf/extra/
so the custom the ap2 etc. and then copy the httpd-info in there and remove that authentication stuff, or use the one I still use which is this:

Code:
<Location /server-status>
    SetHandler server-status
#    Require host .example.com
    Require ip 127
    Require ip 84.xx.xx.xx
</Location>

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On

#
# Allow remote server configuration reports, with the URL of
#  http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
<Location /server-info>
    SetHandler server-info
#    Require host .example.com
    Require ip 127
    Require ip 84.xx.xx.xx
</Location>

Then you can rebuild the confs and this httpd-info.conf should also be present in the /etc/httpd/conf/extra directory.
This way CSF should be able to access the server-status page without any password.

However, be aware that I did not test this with CSF myself.
Just tested this... it's working.
 
Last edited:

rotame

Verified User
Joined
Jul 4, 2019
Messages
76
Hi,

Seems caused from latest update , I have the same problem :

Server with similar error :
[[email protected] domains]# /usr/local/directadmin/directadmin v
Version: DirectAdmin v.1.63.4
[[email protected] domains]# httpd -v
Server version: Apache/2.4.51 (Unix)
Server built: Dec 31 2021 00:00:40
[[email protected] domains]#
[[email protected] domains]# cat /etc/httpd/conf/extra/httpd-info.conf
#
# Get information about the requests being processed by the server
# and the configuration of the server.
#
# Required modules: mod_authz_core, mod_authz_host,
# mod_info (for the server-info handler),
# mod_status (for the server-status handler)

#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.

<Location /server-status>
SetHandler server-status
AuthType basic
AuthName "Apache status"
AuthUserFile /var/www/html/passwd-server-status
Require valid-user
</Location>

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On

#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
<Location /server-info>
SetHandler server-info
AuthType basic
AuthName "Apache status"
AuthUserFile /var/www/html/passwd-server-status
Require valid-user
</Location>
#Authenticate using:


Working :
[[email protected] ~]# /usr/local/directadmin/directadmin v
Version: DirectAdmin v.1.63.1
[[email protected] ~]# httpd -v
Server version: Apache/2.4.51 (Unix)
Server built: Dec 29 2021 03:01:11
[[email protected] ~]#
[[email protected] ~]# cat /etc/httpd/conf/extra/httpd-info.conf
#
# Get information about the requests being processed by the server
# and the configuration of the server.
#
# Required modules: mod_authz_core, mod_authz_host,
# mod_info (for the server-info handler),
# mod_status (for the server-status handler)

#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.

<Location /server-status>
SetHandler server-status
Require host .example.com
Require ip 127
</Location>

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On

#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
<Location /server-info>
SetHandler server-info
Require host .example.com
Require ip 127
</Location>
#Authenticate using:
 

CAISC

Verified User
Joined
Dec 2, 2021
Messages
59
Location
SSH Terminal
Latest update allows to view server status, that's much needed feature similar to cpanel Apache status.
As Richard mentioned there is alternate way to get that running with CSF.
 
Top