Configuring Apache Web Server for Monitoring by eG Enterprise
To pull out metrics related to the health of the Apache web serverApache web server, the eG agent accesses a specific URL on the Apache server that contains the required metrics. To allow the eG agent to access this URL, you need to ensure that the following entries in the <Apache_home>\confi\HTTPd.conf file are uncommented (or enabled).
LoadModule status_module modules/mod_status.so
<IfModule mod_status.c>
ExtendedStatus On
</IfModule>
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from <domain name to give access>
</Location>
In case of the Apache web server v2.2 however, you will have to append the following entries to the HTTPd.conf file, soon after uncommenting the LoadModule status_module modules/mod_status.so entry:
<IfModule mod_status.c>
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from <domain name to give access>
</Location>
</IfModule>
While uncommenting or inserting (depending upon the version of Apache being monitored) the aforesaid block, make sure that the <domain name to give access> is configured with the fully qualified domain name that should be permitted to access the URL on the Apache web server. Alternatively, you can even specify the IP address of a particular host that should be granted access, or a space-separated list of 'allowed' IP addresses. Since it is the eG agent that should be allowed access to the URL, specify the fully qualified name of the domain to which the eG agent belongs and/or the IP address of the eG agent in <domain name to give access>. For example, your entry can read as follows:
Allow from mas.eginnovations.com
(OR)
Allow from mas.eginnovations.com 192.168.8.56
This will be the local host's IP/host name in case of an internal agent, or the IP/host name of a remote Windows host in case of a remote agent.
In case of an Apache web server v2.4, you need to uncomment (or enable) the following lines in the <Apache_home>\confi\HTTPd.conf file:
LoadModule status_module modules/mod_status.so
<IfModule mod_status.c>
<Location /server-status>
SetHandler server-status
Require ip <Host IP>
</Location>
</IfModule>
The <Host IP> in the entry highlighted in Red should be replaced with the IP address of the host that should be granted access, or a space-separated list of 'allowed' IP addresses. Since it is the eG agent that should be allowed access to the URL, specify the IP address of the eG agent here. This will be the local host's IP address in case of an internal agent, or the IP address of a remote Windows host in case of a remote agent. Finally, save the file.