Docs » Integrations Guide » Integrations Reference » Apache

../../_images/integrations_apache.png Apache 🔗

DESCRIPTION 🔗

This integration primarily consists of the Smart Agent monitor collectd/apache. Below is an overview of that monitor.

Smart Agent Monitor 🔗

Monitors Apache webservice instances using the information provided by mod_status.

Worker states 🔗

Apache worker threads can be in one of the following states:

State Remark
Open Open (unused) slot - no process
Waiting Idle and waiting for request
Sending Serving response
KeepAlive Kept alive for possible next request
Idle_cleanup Idle and marked for cleanup
Closing Closing connection
Logging Writing to log file
Reading Reading request
Finishing Finishing as part of graceful shutdown
Starting Starting up to serve

INSTALLATION 🔗

This integration is part of the SignalFx Smart Agent as the collectd/apache monitor. You should first deploy the Smart Agent to the same host as the service you want to monitor, and then continue with the configuration instructions below.

CONFIGURATION 🔗

To activate this monitor in the Smart Agent, add the following to your agent config:

monitors:  # All monitor config goes under this key
 - type: collectd/apache
   ...  # Additional config

For a list of monitor options that are common to all monitors, see Common Configuration.

Config option Required Type Description
host yes string The hostname of the Apache server
port yes integer The port number of the Apache server
name no string This will be sent as the plugin_instance dimension and can be any name you like.
url no string The URL, either a final URL or a Go template that will be populated with the host and port values. (default: http://{{.Host}}:{{.Port}}/mod_status?auto)
username no string
password no string

METRICS 🔗

Metric Name Description Type
apache_bytes Amount of data served by Apache, in bytes cumulative
apache_connections The number of connections that are being served by Apache gauge
apache_idle_workers The number of Apache workers that are idling gauge
apache_requests The number of requests that have been served by Apache cumulative
apache_scoreboard.closing This metric shows how many worker threads are in the process of closing TCP connections after serving a response gauge
apache_scoreboard.dnslookup This metric counts the number of worker threads that are performing a DNS lookup gauge
apache_scoreboard.finishing The number of worker threads that are finishing as part of graceful server shutdown gauge
apache_scoreboard.idle_cleanup The number of worker threads that are idle and ready for clean-up gauge
apache_scoreboard.keepalive The number of worker threads that are maintaining keep-alive connections: keeping the connection "alive" after serving a response, in the expectation that another HTTP request will come on the same connection gauge
apache_scoreboard.logging This metric shows how many worker threads are busy writing to the log file gauge
apache_scoreboard.open This metric shows how many worker slots are open gauge
apache_scoreboard.reading This metric shows how many workers are in the process of receiving requests (headers or body) gauge
apache_scoreboard.sending This metric shows how many workers are sending responses gauge
apache_scoreboard.starting This metric shows how many workers are being started up gauge
apache_scoreboard.waiting This metric shows how many worker threads are ready and waiting for requests to come in gauge

apache_bytes 🔗

cumulative

Amount of data served by Apache, in bytes.

apache_connections 🔗

gauge

The number of connections that are being served by Apache. This is also equal to the number of busy worker threads, where ‘busy’ means any worker thread which has been started successfully and is not slated for idle cleanup.

apache_idle_workers 🔗

gauge

The number of Apache workers that are idling. If this number is consistently low, then your server may be too busy and you may have to increase the number of threads. If it is consistently high, then the system may be under-utilized.

apache_requests 🔗

cumulative

The number of requests that have been served by Apache. This metric is useful to know total requests and the rate at which Apache is able to serve them.

apache_scoreboard.closing 🔗

gauge

This metric shows how many worker threads are in the process of closing TCP connections after serving a response. If this number is consistently high, then there might be a network issue or errant client preventing TCP tear-down.

apache_scoreboard.dnslookup 🔗

gauge

This metric counts the number of worker threads that are performing a DNS lookup. If this number is too high, check if there is a DNS resolution problem at your server. This can affect Apache server performance.

apache_scoreboard.finishing 🔗

gauge

The number of worker threads that are finishing as part of graceful server shutdown.

apache_scoreboard.idle_cleanup 🔗

gauge

The number of worker threads that are idle and ready for clean-up.

apache_scoreboard.keepalive 🔗

gauge

The number of worker threads that are maintaining keep-alive connections: keeping the connection “alive” after serving a response, in the expectation that another HTTP request will come on the same connection. At the end of the keep-alive interval, the connection is closed.

apache_scoreboard.logging 🔗

gauge

This metric shows how many worker threads are busy writing to the log file. If this number is consistently high, your logging level may be too high or one or more modules may be too verbose.

apache_scoreboard.open 🔗

gauge

This metric shows how many worker slots are open. The slots do not have a worker thread yet, but they can be spun up based on incoming requests.

apache_scoreboard.reading 🔗

gauge

This metric shows how many workers are in the process of receiving requests (headers or body). If this number is consistently high, clients may be sending large headers or uploading large files.

apache_scoreboard.sending 🔗

gauge

This metric shows how many workers are sending responses. It is normal for this to be a large number when measuring sites that serve large downloads.

apache_scoreboard.starting 🔗

gauge

This metric shows how many workers are being started up. If this number is consistently high, then the system may be overloaded.

apache_scoreboard.waiting 🔗

gauge

This metric shows how many worker threads are ready and waiting for requests to come in.

These are the metrics available for this monitor. Metrics that are categorized as container/host (default) are in bold and italics in the list below.

  • apache_bytes (cumulative)
    Amount of data served by Apache, in bytes.
  • apache_connections (gauge)
    The number of connections that are being served by Apache. This is also equal to the number of busy worker threads, where ‘busy’ means any worker thread which has been started successfully and is not slated for idle cleanup.
  • apache_idle_workers (gauge)
    The number of Apache workers that are idling. If this number is consistently low, then your server may be too busy and you may have to increase the number of threads. If it is consistently high, then the system may be under-utilized.
  • apache_requests (cumulative)
    The number of requests that have been served by Apache. This metric is useful to know total requests and the rate at which Apache is able to serve them.
  • apache_scoreboard.closing (gauge)
    This metric shows how many worker threads are in the process of closing TCP connections after serving a response. If this number is consistently high, then there might be a network issue or errant client preventing TCP tear-down.
  • apache_scoreboard.dnslookup (gauge)
    This metric counts the number of worker threads that are performing a DNS lookup. If this number is too high, check if there is a DNS resolution problem at your server. This can affect Apache server performance.
  • apache_scoreboard.finishing (gauge)
    The number of worker threads that are finishing as part of graceful server shutdown.
  • apache_scoreboard.idle_cleanup (gauge)
    The number of worker threads that are idle and ready for clean-up.
  • apache_scoreboard.keepalive (gauge)
    The number of worker threads that are maintaining keep-alive connections: keeping the connection “alive” after serving a response, in the expectation that another HTTP request will come on the same connection. At the end of the keep-alive interval, the connection is closed.
  • apache_scoreboard.logging (gauge)
    This metric shows how many worker threads are busy writing to the log file. If this number is consistently high, your logging level may be too high or one or more modules may be too verbose.
  • apache_scoreboard.open (gauge)
    This metric shows how many worker slots are open. The slots do not have a worker thread yet, but they can be spun up based on incoming requests.
  • apache_scoreboard.reading (gauge)
    This metric shows how many workers are in the process of receiving requests (headers or body). If this number is consistently high, clients may be sending large headers or uploading large files.
  • apache_scoreboard.sending (gauge)
    This metric shows how many workers are sending responses. It is normal for this to be a large number when measuring sites that serve large downloads.
  • apache_scoreboard.starting (gauge)
    This metric shows how many workers are being started up. If this number is consistently high, then the system may be overloaded.
  • apache_scoreboard.waiting (gauge)
    This metric shows how many worker threads are ready and waiting for requests to come in.

Non-default metrics (version 4.7.0+) 🔗

The following information applies to the agent version 4.7.0+ that has enableBuiltInFiltering: true set on the top level of the agent config.

To emit metrics that are not default, you can add those metrics in the generic monitor-level extraMetrics config option. Metrics that are derived from specific configuration options that do not appear in the above list of metrics do not need to be added to extraMetrics.

To see a list of metrics that will be emitted you can run agent-status monitors after configuring this monitor in a running agent instance.

Legacy non-default metrics (version < 4.7.0) 🔗

The following information only applies to agent version older than 4.7.0. If you have a newer agent and have set enableBuiltInFiltering: true at the top level of your agent config, see the section above. See upgrade instructions in Old-style whitelist filtering.

If you have a reference to the whitelist.json in your agent’s top-level metricsToExclude config option, and you want to emit metrics that are not in that whitelist, then you need to add an item to the top-level metricsToInclude config option to override that whitelist (see Inclusion filtering. Or you can just copy the whitelist.json, modify it, and reference that in metricsToExclude.