Apache Plugin

Last modified: January 25, 2022


Overview

The Apache (httpd) plugin monitors the performance of your Apache webserver.

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:

1
2
3
4
5
6
<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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<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.ini file and add the following lines:

1
2
3
[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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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.


Get Started With 360

360 Dashboard

360 Monitoring Dashboard