Apache Plugin
The Apache (httpd) plugin monitors the performance of your Apache webserver.
The Apache (httpd
) plugin monitors the performance of your Apache webserver.
Reported Metrics
- IdleWorkers
- ReadingWorkers
- WritingWorkers
- KeepaliveWorkers
- DnsWorkers
- ClosingWorkers
- LoggingWorkers
- FinishingWorkers
- CleanupWorkers
- requests_per_second
- Total kBytes
- Total Accesses
- ServerUptimeSeconds
- BusyWorkers
- BytesPerReq
- BytesPerSec
- ConnsAsyncClosing
- ConnsAsyncKeepAlive
- ConnsAsyncWriting
- DnsWorkers
Enable the status page
To enable the Apache status page, add the following code to your Apache (httpd.conf
) configuration file:
<Location "/server-status">
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
The status page will only be available from the machine running Apache.
You can test if the status page is working by running the following command:
wget -qO- http://127.0.0.1/server-status?auto
Configure the plugin
To configure the plugin, edit the /etc/httpd/conf.d/zz030_ext-monitoring.conf
file and add the following lines:
<IfModule mod_status.c>
Listen 7050
<VirtualHost 127.0.0.1:7050>
ServerName server.local
<Location "/httpd-status">
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
</VirtualHost>
</IfModule>
To enable the plugin, edit the /etc/agent360-custom.ini
file and add the following lines:
[httpd]
enabled = true
status_page_url = http://127.0.0.1:7050/httpd-status?auto
Test the plugin
Test to see if the plugin is working by running agent360 --test httpd
. It should show the following metrics:
httpd:
{
"BusyWorkers": "1",
"BytesPerReq": "1183.62",
"BytesPerSec": "20.1089",
"CleanupWorkers": 0,
"ClosingWorkers": 0,
"ConnsAsyncClosing": "0",
"ConnsAsyncKeepAlive": "0",
"ConnsAsyncWriting": "0",
"ConnsTotal": "0",
"DnsWorkers": 0,
"FinishingWorkers": 0,
"IdleWorkers": 49,
"KeepaliveWorkers": 0,
"LoggingWorkers": 0,
"ParentServerConfigGeneration": "2",
"ParentServerMPMGeneration": "1",
"ReadingWorkers": 0,
"ServerMPM": "event",
"ServerUptimeSeconds": "69102",
"ServerVersion": "Apache/2.4.18 (Ubuntu)",
"Total Accesses": "1174",
"Total kBytes": "1357",
"Uptime": "69102",
"WritingWorkers": 1,
"requests_per_second": 0
}
Now you can restart the agent with the service agent360 restart
command.
Updated 4 months ago