Fortinet Document Library

Version:


Table of Contents

User Guide

21.4.0
Copy Link

Apache Webserver

Apache Configuration

Redhat/CentOS

Add the following module to your /etc/httpd/conf/httpd.conf file.

LoadModule status_module /usr/lib64/httpd/modules/mod_status.so
<IfModule status_module>
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Allow from all
</Location>
</IfModule>

After you make this update to the Apache conf file, restart Apache with sudo service httpd restart.

Ubuntu

Add the following module to your /etc/apache2/apache2.conf file.

LoadModule status_module libexec/apache2/mod_status.so
<IfModule status_module>
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Allow from all
</Location>
</IfModule>


After you make this update to the Apache conf file, restart Apache with sudo /etc/init.d/apache2 restart

Log File Access

To monitor 2xx / 3xx / 4xx request count, the FortiMonitor Agent user needs to be able to read the server's Apache access log file and traverse the Apache log directory. It can be found at the following location, depending on your Linux distro:

  • Debian / Ubuntu:/var/log/apache2/access.log

  • RHEL / Red Hat / CentOS:/var/log/httpd/access_log

  • FreeBSD: /var/log/httpd-access.log

You may also need to update any logrotate files to ensure that permissions persist after log rotation.

Agent Configuration

The agent config file can be used to optionally override default Apache settings.

  • server_status_url: Location of the Apache server status endpoint. Defaults to server-status, as in localhost/server-status

  • apache_log_files: location of the log file containing your 2xx/3xx/4xx requests. Defaults are in the Log File Access section contained in this document

  • server_status_protocol: HTTP protocol to be used when accessing the server-status endpoint. Can be set to http or https and defaults to http

  • server_status_port: Port to use if the status page is running on a non-standard port

  • server_status_host: IP to use if Apache is not listening on localhost 

/etc/panopta-agent/panopta_agent.cfg

[apache]
server_status_url = server-status
apache_log_files = /var/log/apache2/access.log
server_status_protocol = http

Control Panel Configuration

Apache monitoring is added to a server via the Monitoring Catalog. If you do not see Apache as a discovered resource, you may need to rebuild your Agent metadata. You can read about that here.

Metric

Unit

Workers used

%

Workers idle

%

Workers idle count

workers

Workers used count                                              

workers                            

Uptime

seconds

Total accesses

requests

Total traffic

mb

CPU load

%

Connections

connections

Transfer rate

mb/s

Avg. request size

mb

2xx Requests

requests

3xx Requests

requests

4xx Requests

requests


Apache Webserver

Apache Configuration

Redhat/CentOS

Add the following module to your /etc/httpd/conf/httpd.conf file.

LoadModule status_module /usr/lib64/httpd/modules/mod_status.so
<IfModule status_module>
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Allow from all
</Location>
</IfModule>

After you make this update to the Apache conf file, restart Apache with sudo service httpd restart.

Ubuntu

Add the following module to your /etc/apache2/apache2.conf file.

LoadModule status_module libexec/apache2/mod_status.so
<IfModule status_module>
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Allow from all
</Location>
</IfModule>


After you make this update to the Apache conf file, restart Apache with sudo /etc/init.d/apache2 restart

Log File Access

To monitor 2xx / 3xx / 4xx request count, the FortiMonitor Agent user needs to be able to read the server's Apache access log file and traverse the Apache log directory. It can be found at the following location, depending on your Linux distro:

  • Debian / Ubuntu:/var/log/apache2/access.log

  • RHEL / Red Hat / CentOS:/var/log/httpd/access_log

  • FreeBSD: /var/log/httpd-access.log

You may also need to update any logrotate files to ensure that permissions persist after log rotation.

Agent Configuration

The agent config file can be used to optionally override default Apache settings.

  • server_status_url: Location of the Apache server status endpoint. Defaults to server-status, as in localhost/server-status

  • apache_log_files: location of the log file containing your 2xx/3xx/4xx requests. Defaults are in the Log File Access section contained in this document

  • server_status_protocol: HTTP protocol to be used when accessing the server-status endpoint. Can be set to http or https and defaults to http

  • server_status_port: Port to use if the status page is running on a non-standard port

  • server_status_host: IP to use if Apache is not listening on localhost 

/etc/panopta-agent/panopta_agent.cfg

[apache]
server_status_url = server-status
apache_log_files = /var/log/apache2/access.log
server_status_protocol = http

Control Panel Configuration

Apache monitoring is added to a server via the Monitoring Catalog. If you do not see Apache as a discovered resource, you may need to rebuild your Agent metadata. You can read about that here.

Metric

Unit

Workers used

%

Workers idle

%

Workers idle count

workers

Workers used count                                              

workers                            

Uptime

seconds

Total accesses

requests

Total traffic

mb

CPU load

%

Connections

connections

Transfer rate

mb/s

Avg. request size

mb

2xx Requests

requests

3xx Requests

requests

4xx Requests

requests